     reversed = not @editor.getLastSelection().isReversed()
     @syncSelectionsReversedSate(reversed)
 
-  # reselectLastVisual: ->
-  #   return unless @lastVisual
-  #   @activate(mode, submode)
-  #   {mode, submode, range, reversed} = @lastVisual
-  #   @editor.getLastSelection().setBufferRange(range, reversed)
-
   syncSelectionsReversedSate: (reversed) ->
     for selection in @editor.getSelections()
       selection.setBufferRange(selection.getBufferRange(), {reversed})

    # Handle with config onDidChange subscription?
    @hover = new Hover(this, 'showHoverOnOperate')
    @hoverSearchCounter = new Hover(this, 'showHoverSearchCounter')

    @searchHistory = new SearchHistoryManager(this)
    @input = new Input(this)
    @search = new Search(this)

    @operationStack = new OperationStack(this)
    @modeManager = new ModeManager(this)

    @editorElement.addEventListener 'mouseup', @checkSelections.bind(this)

    if atom.commands.onDidDispatch?
      @subscriptions.add atom.commands.onDidDispatch ({target}) =>
        return unless (target is @editorElement)
        @checkSelections()
        return unless settings.get('showCursorInVisualMode')
        switch
          when @isMode('visual', 'characterwise')
            @showCursors(@editor.getCursors())
          when @isMode('visual', 'blockwise')
            cursors =
              for s in @editor.getSelections() when swrap(s).get().blockwise?.head
                s.cursor
            @showCursors(cursors)

    @addClass packageScope
    @init()

    action = (if condition then 'add' else 'remove')
    @editorElement.classList[action](klass)

  dontPutCursorsAtEndOfLine: (whoCall) ->
    for c in @editor.getCursors() when c.isAtEndOfLine() and not c.isAtBeginningOfLine()
      # console.log "dontPutCursorsAtEOL: #{whoCall} MOVE!!"
      {goalColumn} = c
      c.moveLeft()
      c.goalColumn = goalColumn
