Fix bug in character measuring code for line containing only a multi-line widget