Gets correctly sized windows for one line documents.