       markerBySelections[selection.id] = marker
     markerBySelections
 
-  flash: (range) ->
+  flash: (range, fn=null) ->
     marker = @editor.markBufferRange range,
       invalidate: 'never',
       persistent: false
-
+    fn?()
     @editor.decorateMarker marker,
       type: 'highlight'
       class: 'vim-mode-flash'

  @extend()
  hoverText: ':clipboard:'
  hoverIcon: ':yank:'
  execute: ->
    if @target.isLinewise?()
      points = (s.getBufferRange().start for s in @editor.getSelections())
    @selectTargetWithFlashing =>
      @setTextToRegister @editor.getSelectedText()
      for selection in @editor.getSelections()
        point = points?.shift() ? selection.getBufferRange().start
        selection.cursor.setBufferPosition point
    @vimState.activateNormalMode()

class YankLine extends Yank

  hoverIcon: ':delete:'

  execute: ->
    @eachSelection (s) =>
      @setTextToRegister s.getText() if s.isLastSelection()
      s.deleteSelectedText()
      s.cursor.skipLeadingWhitespace() if @target.isLinewise?()
    @vimState.activateNormalMode()

class DeleteRight extends Delete
