Move cursor in a direction.
Current document lines
Current cursor position
Movement direction
New cursor position
Move cursor in a direction.