     catch error
       if error.instanceof?('OperatorError')
         @vimState.resetNormalMode()
+      else if error instanceof OperationStackError
+        @vimState.resetNormalMode()
       else
         throw error
 

  reduce: ->
    until @stack.length < 2
      operation = @stack.pop()
      @peekTop().setTarget(operation)

  reset: ->

{moveCursorLeft} = require './utils'
settings = require './settings'
{CurrentSelection, Select, MoveToRelativeLine} = {}


class OperationStackError extends Error
  constructor: ({@message}) ->
    @name = @constructor.name

class OperationStack
  constructor: (@vimState) ->
