       @forceWise = wise
 
   # @target - TextObject or Motion to operate on.
-  setTarget: (@target) ->
-    unless _.isFunction(@target.select)
+  setTarget: (target) ->
+    unless _.isFunction(target.select)
       @vimState.emitter.emit('did-fail-to-set-target')
-      throw new OperatorError("#{@getName()} cannot set #{@target.getName()} as target")
+      throw new OperatorError("#{@getName()} cannot set #{target?.getName?()} as target")
+    @target = target
     @target.setOperator(this)
-    @overrideTargetWise(@forceWise) if @hasForceWise()
+    @modifyTargetWise(@target, @forceWise) if @hasForceWise()
     @emitDidSetTarget(this)
     this
 
-  overrideTargetWise: (wise) ->
+  modifyTargetWise: (target, wise) ->
     switch wise
       when 'characterwise'
-        if @target.linewise
-          @target.linewise = false
-          @target.inclusive = false
+        if target.linewise
+          target.linewise = false
+          target.inclusive = false
         else
-          @target.inclusive = not @target.inclusive
+          target.inclusive = not target.inclusive
       when 'linewise'
-        @target.linewise = true
+        target.linewise = true
 
   isWithOccurrence: ->
     @withOccurrence

  # For TextObject, isLinewise result is changed before / after select.
  # This mean return value may change depending on when you call.
  needStay: ->
    @wasNeedStay ?= do =>
      if @instanceof('TransformString')
        param = "stayOnTransformString"
      else

    @forceWise?

  # Return true unless all selection is empty.
  selectTarget: ->
    @observeSelectAction()
    @emitWillSelectTarget()
