Only measure character widths when editor is visible