   hoverText: ':pencil:'
   hoverIcon: ':replace-with-register:'
   execute: ->
-    @selectTarget =>
-      @withFlashing =>
-        points = _.pluck(@editor.getSelectedBufferRanges(), 'start')
-        @editor.replaceSelectedText {}, (text) =>
-          @vimState.register.get().text ? text
-        ranges = (new Range(p, p) for p in points)
-        @editor.setSelectedBufferRanges(ranges)
+    @selectTargetWithFlashing =>
+      points = _.pluck(@editor.getSelectedBufferRanges(), 'start')
+      @editor.replaceSelectedText {}, (text) =>
+        @vimState.register.get().text ? text
+      ranges = (new Range(p, p) for p in points)
+      @editor.setSelectedBufferRanges(ranges)
     @vimState.activateNormalMode()
 
 class ToggleLineComments extends Operator

  execute: ->
    if @target.isLinewise?() or settings.get('stayOnTransformString')
      points = _.pluck(@editor.getSelectedBufferRanges(), 'start')
    @selectTarget =>
      @withFlashing =>
        for selection in @editor.getSelections()
          range = selection.insertText @getNewText(selection.getText())
          if @adjustCursor
            selection.cursor.setBufferPosition(points?.shift() ? range.start)
    @vimState.activateNormalMode()

class ToggleCase extends TransformString

  hoverIcon: ':toggle-line-comment:'
  execute: ->
    markerByCursor = @markCursorBufferPositions()
    @selectTargetWithFlashing =>
      @editor.transact =>
        for s in @editor.getSelections()
          s.toggleLineComments()
    @restoreMarkedCursorPositions markerByCursor
    @vimState.activateNormalMode()

