diff options
| author | Stephen Blott | 2015-02-05 15:03:55 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2015-02-05 15:04:14 +0000 | 
| commit | 449462b2580478b9c6d8b35f05231aad989d01aa (patch) | |
| tree | 7363a82c936da9aea05dd8ad712215721a0cd2dd /content_scripts/mode_visual_edit.coffee | |
| parent | ae1697b6697e24c77fc852b02c760871db995a3f (diff) | |
| download | vimium-449462b2580478b9c6d8b35f05231aad989d01aa.tar.bz2 | |
Visual/edit modes: Fix ae1697b6697e24c77fc852b02c760871db995a3f...
which was broken.
Diffstat (limited to 'content_scripts/mode_visual_edit.coffee')
| -rw-r--r-- | content_scripts/mode_visual_edit.coffee | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/content_scripts/mode_visual_edit.coffee b/content_scripts/mode_visual_edit.coffee index 7223e099..ba0bc307 100644 --- a/content_scripts/mode_visual_edit.coffee +++ b/content_scripts/mode_visual_edit.coffee @@ -367,6 +367,7 @@ class Movement extends CountPrefix    yank: (args = {}) ->      @yankedText = @selection.toString()      @selection.deleteFromDocument() if @options.deleteFromDocument or args.deleteFromDocument +    @selection.removeAllRanges()      message = @yankedText.replace /\s+/g, " "      message = message[...12] + "..." if 15 < @yankedText.length @@ -378,10 +379,8 @@ class Movement extends CountPrefix      @yankedText    exit: (event, target) -> -    @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 +    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  | 
