         if _.last(@motion.select(1, @selectOptions))
           @editor.getSelection().delete()
 
-        @editor.moveCursorLeft() if cursor.isAtEndOfLine() and !@motion.isLinewise?()
+        @editor.moveCursorLeft() if !@allowEOL and cursor.isAtEndOfLine() and !@motion.isLinewise?()
 
       if @motion.isLinewise?()
         @editor.setCursorScreenPosition([cursor.getScreenRow(), 0])

  motion: null
  complete: null
  vimState: null
  selectOptions: null

  constructor: (@editor, @vimState, @motion, @selectOptions={}) ->
    @complete = false

  isComplete: -> @complete

  #
  # Returns nothing.
  execute: (count=1) ->
    operator = new Delete(@editor, @vimState,
      motion: @motion, allowEOL: true, selectOptions: {excludeWhitespace: true})
    operator.execute(count)

    @vimState.activateInsertMode()

  # Public: Marks this as complete and saves the motion.
  #
