       @handleError(error)
 
   runRecorded: ->
-    if operation = @getRecorded()
+    if operation = @recordedOperation
       operation.setRepeated()
       if @hasCount()
         count = @getCount()

      if commandName = top.constructor.getCommandNameWithoutPrefix?()
        @addToClassList(commandName + "-pending")

  addToClassList: (className) ->
    @editorElement.classList.add(className)
    @subscribe new Disposable =>
      @editorElement.classList.remove(className)

  execute: (operation) ->
    execution = operation.execute()
    if execution instanceof Promise

      @vimState.resetNormalMode()
    @finish()

  finish: (operation=null) ->
    @recordedOperation = operation if operation?.isRecordable()
    @vimState.emitter.emit('did-finish-operation')

    if @vimState.isMode('normal')
