Move cursor by word.
Current document lines
Current cursor position
Word movement direction
New cursor position
Move cursor by word.