       point = markers[i].getStartBufferPosition()
       selection.cursor.setBufferPosition(point)
 
-  getRestoreCursorType: ->
-    switch
-      when not @restoreCursor?
-        null
-      when settings.get(@restoreCursor.config)
-          , (@target.isLinewise?() and @stayOnLinewise)
-        @restoreCursor.stay
-      else
-        @restoreCursor.default
-
+  getCursorPositionInstruction: ->
+    return null unless @cursorPositionOnOperate?
+    {config, stayOnLinewise, stay, default: _default} = @cursorPositionOnOperate
+    if settings.get(config) or (@target.isLinewise?() and stayOnLinewise)
+      stay
+    else
+      _default
+
+  # restoreCursor would be set to one of following value,
+  #  point: original cursor position
+  #  marker: mark original cursor position
+  #  start: start point of selection after @target.select()
+  #  firstChar: first char of start line of selection after @target.select()
   eachSelection: (fn) ->
     select = =>
       @target.select() unless @haveSomeSelection()
-    restoreCursor = @getRestoreCursorType()
-    switch restoreCursor
-      when 'point'
+
+    switch instruction = @getCursorPositionInstruction()
+      when 'pointBeforeSelect'
         restore = @preservePoints()
         select()
-      when 'marker'
+      when 'pointBeforeSelectAsMarker'
         restore = @preservePointsAsMarker()
         select()
-      when 'start', 'firstChar'
+      when 'startPointOfSelection', 'firstCharacterOfStartLineOfSelection'
         select()
         restore = @preservePoints()
       else

class ReplaceWithRegister extends Operator
  @extend()
  hover: icon: ':replace-with-register:', emoji: ':pencil:'
  restoreCursor: default: 'start', stay: 'point', config: 'stayOnReplaceWithRegister'
  execute: ->
    @eachSelection (s) =>
      newText = @vimState.register.getText() ? s.getText()

class Indent extends Operator
  @extend()
  hover: icon: ':indent:', emoji: ':point_right:'
  cursorPositionOnOperate:
    default: 'firstCharacterOfStartLineOfSelection'
    stay: 'pointBeforeSelect'
    config: 'stayOnIndent'

  execute: ->
    @eachSelection (s) =>
