Reimplemting caret position