[TextEditor] Fixed potential problem in height calculation.
Fixed 'Bug 15476 - Cursor is getting stuck when deleting last empty
line with indents '.