 
   mutateSelection: (selection) ->
     selection[@indentFunction]()
+    @restorePoint(selection)
     unless @needStay()
-      fn = (selection) ->
-        selection.cursor.moveToFirstCharacterOfLine()
-    @restorePoint(selection, fn)
+      selection.cursor.moveToFirstCharacterOfLine()
 
 class Outdent extends Indent
   @extend()

        insertText(text) if text.length >= @getCount()
      else
        insertText(text)

      @restorePoint(selection) unless (input is "\n")

    # FIXME this is very imperative, handling in very lower level.

    @initialize()
    @setTarget(@new(@target)) if _.isString(@target)

  restorePoint: (selection) ->
    which = if @wasNeedStay then 'head' else 'start'
    restore = -> swrap(selection).setBufferPositionTo(which, fromProperty: true)

    if @isWithOccurrence()
      if swrap(selection).getProperties().head?
        # Deffer restoring cursor point.
        # restorePoint is processed one by one, so immediately updating cursorPosition result in intersecting range with other selection
        # when intersecting selection is destroyed, cursor is moved automatically.
        @onDidFinishOperation -> restore()
      else
        selection.destroy()
    else
      restore()

  observeSelectAction: ->
    # Select operator is used only in visual-mode.
