Implemented up/down caret movement