       @initOverwrittenByEditor()
       @editor.transact =>
         @countTimes =>
-          @_takenIndex = 0
-          for selection in selections
+          for selection, i in selections
+            @selectionIndex = i
             @mutate(selection) if @isMovable(selection)
 
   initOverwrittenByEditor: ->

          @editor.setTextInBufferRange([eof, eof], "\n")
        true

  getRangeTranslationSpec: (wise) ->
    if wise is 'linewise'
      switch @direction
        when 'up' then [[-1, 0], [0, 0]]
        when 'down' then [[0, 0], [1, 0]]
    else if 'characterwis'
      switch @direction
        when 'up' then [[-1, 0], [-1, 0]]
        when 'down' then [[1, 0], [1, 0]]

  # Characterwise
  # -------------------------
  moveCharacterwise: (selection) ->
    reversed = selection.isReversed()
    translation = @getRangeTranslationSpec('characterwise')
    fromRange = selection.getBufferRange()
    toRange = fromRange.translate(translation...)
    @swapTextInRange(fromRange, toRange)


  moveCharacterwise: (selection) ->
    reversed = selection.isReversed()

    translation = switch @direction
      when 'right' then [[0, 0], [0, +1]]
      when 'left' then [[0, -1], [0, 0]]

    swrap(selection).translate(translation)
    newText = @rotate(selection.getText())
    range = selection.insertText(newText)
