   @extend()
   hoverText: ':clipboard:'
   hoverIcon: ':yank:'
+  flashTarget: true
   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
+    @eachSelection (s) =>
+      @setTextToRegister s.getText() if s.isLastSelection()
+      point = points?.shift() ? s.getBufferRange().start
+      s.cursor.setBufferPosition point
     @vimState.activateNormalMode()
 
 class YankLine extends Yank

      marker.destroy()
    , settings.get('flashOnOperateDurationMilliSeconds')

  withFlashing: (callback) ->
    unless settings.get('flashOnOperate')
      callback()
      return

    markerBySelections = @markSelections()
    callback()
    for selection in @editor.getSelections()
      @editor.decorateMarker markerBySelections[selection.id],
        type: 'highlight'
        class: 'vim-mode-flash'

    # Ensure destroy all marker
    setTimeout  ->
      marker.destroy() for __, marker of markerBySelections
    , settings.get('flashOnOperateDurationMilliSeconds')

  selectTarget: (callback) ->
    if @target.select()
      callback()

  selectTargetWithFlashing: (callback) ->
    @selectTarget =>
      @withFlashing ->
        callback()

class Select extends Operator
  @extend()

      markerBySelections[selection.id] = marker
    markerBySelections

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