fix caret position after empty text carriage return