fix bug: when after delete text[0] caret wasn't moved