set caret at the end of word