   execute: ->
     @startMutation =>
       if @selectTarget()
-        for selection in @editor.getSelections()
+        if @mutateSelectionOrderd
+          selections = @editor.getSelectionsOrderedByBufferPosition()
+        else
+          selections = @editor.getSelections()
+        for selection in selections
           @mutateSelection(selection)
         @restoreCursorPositionsIfNecessary()
 

      if settings.get('flashOnOperate') and (@getName() not in settings.get('flashOnOperateBlacklist'))
        @vimState.flash(@newRanges, type: @flashTypeForOccurrence)

class Decrease extends Increase
  @extend()
  step: -1

# -------------------------
class IncrementNumber extends Operator
  @extend()
  displayName: 'Increment ++'
  baseNumber: null
  step: 1

  execute: ->
    newRanges = null
    @pattern ?= ///#{settings.get('numberRegex')}///g

    @startMutation =>
      if @selectTarget()
        selections = @editor.getSelectionsOrderedByBufferPosition()
        newRanges = (@replaceNumber(selection) for selection in selections)

    if (@newRanges = _.flatten(newRanges)).length
      if settings.get('flashOnOperate') and (@getName() not in settings.get('flashOnOperateBlacklist'))
        @vimState.flash(@newRanges, type: @flashTypeForOccurrence)

    for selection in @editor.getSelections()
      selection.cursor.setBufferPosition(selection.getBufferRange().start)
    @activateModeIfNecessary('normal')

  replaceNumber: (selection) ->
    scanRange = selection.getBufferRange()
    newRanges = []
    @editor.scanInBufferRange @pattern, scanRange, ({matchText, replace}) =>
      newRanges.push(replace(@getNextNumber(matchText)))
    newRanges

  getNextNumber: (text) ->
    if @baseNumber?
      @baseNumber += @step * @getCount()
    else
      @baseNumber = parseInt(text, 10)
    String(@baseNumber)

class DecrementNumber extends IncrementNumber
  @extend()

  restorePositions: false
  step: 1

  execute: ->
    @newRanges = []
    super
