 moveCursorLeft = (cursor, options={}) ->
   {allowWrap} = options
   delete options.allowWrap
+
   if not cursor.isAtBeginningOfLine() or allowWrap
-    moveCursor cursor, options, (cursor) ->
-      cursor.moveLeft()
+    move = (cursor) -> cursor.moveLeft()
+    moveCursor(cursor, options, move)
 
 moveCursorRight = (cursor, options={}) ->
   {allowWrap} = options
   delete options.allowWrap
   if not cursor.isAtEndOfLine() or allowWrap
-    moveCursor cursor, options, (cursor) ->
-      cursor.moveRight()
+    move = (cursor) -> cursor.moveRight()
+    moveCursor(cursor, options, move)
 
 moveCursorUp = (cursor, options={}) ->
   unless cursor.getScreenRow() is 0
-    moveCursor cursor, options, (cursor) ->
-      cursor.moveUp()
+    move = (cursor) -> cursor.moveUp()
+    moveCursor(cursor, options, move)
 
 moveCursorDown = (cursor, options={}) ->
   unless getVimLastScreenRow(cursor.editor) is cursor.getScreenRow()
-    moveCursor cursor, options, (cursor) ->
-      cursor.moveDown()
+    move = (cursor) -> cursor.moveDown()
+    moveCursor(cursor, options, move)
 
 # FIXME
 moveCursorDownBuffer = (cursor) ->


# Debugging purpose
# -------------------------
reportSelection = (subject, selection) ->
  console.log subject, selection.getBufferRange().toString()


  reportSelection,
  reportCursor
  withTrackingCursorPositionChange
  logGoalColumnForSelection
}
