fixed a wrong optimization when opening a new text line