     @hover.reset()
     @operationStack.clear()
 
-
   # Miscellaneous commands
   # -------------------------
   undo: ->

      cursor.setVisible(true) unless cursor.isVisible()
      @updateClassCond cursor.selection.isReversed(), 'reversed'

  addClass:    (klass) ->
    @editorElement.classList.add(klass)

  removeClass: (klass) ->
    @editorElement.classListr.remove(klass)

  updateClassCond: (condition, klass) ->
    action = (if condition then 'add' else 'remove')

    if @editor.isAlive()
      @activate('normal') # reset to base mdoe.
      @editorElement.component?.setInputEnabled(true)
      @removeClass 'vim-mode', 'normal-mode'
    # @editorElement.removeEventListener 'mouseup', @checkSelections
    @editor = null
    @editorElement = null
