diff options
| -rw-r--r-- | content_scripts/mode_visual_edit.coffee | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/content_scripts/mode_visual_edit.coffee b/content_scripts/mode_visual_edit.coffee index c62fae87..7223e099 100644 --- a/content_scripts/mode_visual_edit.coffee +++ b/content_scripts/mode_visual_edit.coffee @@ -366,11 +366,7 @@ class Movement extends CountPrefix # returns it. yank: (args = {}) -> @yankedText = @selection.toString() - - if @options.deleteFromDocument or args.deleteFromDocument - @selection.deleteFromDocument() - else - @collapseSelectionToAnchor() + @selection.deleteFromDocument() if @options.deleteFromDocument or args.deleteFromDocument message = @yankedText.replace /\s+/g, " " message = message[...12] + "..." if 15 < @yankedText.length @@ -382,8 +378,10 @@ class Movement extends CountPrefix @yankedText exit: (event, target) -> - unless @options.parentMode or @options.oneMovementOnly - @selection.removeAllRanges() if event?.type == "keydown" and KeyboardUtils.isEscape event + @selection.removeAllRanges() unless @options.parentMode or @options.oneMovementOnly + # Disabled. We'll go with always removing the selection (as above), for now. + # unless @options.parentMode or @options.oneMovementOnly + # @selection.removeAllRanges() if event?.type == "keydown" and KeyboardUtils.isEscape event # Disabled, pending discussion of fine-tuning the UX. Simpler alternative is implemented above. # # If we're exiting on escape and there is a range selection, then we leave it in place. However, an |
