diff options
| author | Stephen Blott | 2015-01-27 16:36:49 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-01-27 16:36:54 +0000 |
| commit | a982ce074d517eb9e56c517d86a4bfb3869cf171 (patch) | |
| tree | 372a3cf5f96238e223cb91eccdfa56923e8fe854 /content_scripts/mode_visual_edit.coffee | |
| parent | 9d97ce8dab7672d7d1846f7cbe4d22af80c91b01 (diff) | |
| download | vimium-a982ce074d517eb9e56c517d86a4bfb3869cf171.tar.bz2 | |
Visual/edit modes: minor changes.
- Minor changes.
- Deactivate modes on inputs from focusInput().
Diffstat (limited to 'content_scripts/mode_visual_edit.coffee')
| -rw-r--r-- | content_scripts/mode_visual_edit.coffee | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/content_scripts/mode_visual_edit.coffee b/content_scripts/mode_visual_edit.coffee index a1666d75..70d95dff 100644 --- a/content_scripts/mode_visual_edit.coffee +++ b/content_scripts/mode_visual_edit.coffee @@ -2,10 +2,11 @@ # Todo: # Konami code? # Use find as a mode. -# Refactor visual/movement modes. +# Perhaps refactor visual/movement modes. +# FocusInput selector is currently broken. # This prevents printable characters from being passed through to the underlying page. It should, however, -# allow through chrome keyboard shortcuts. It's a keyboard-event backstop for visual mode and edit mode. +# allow through Chrome keyboard shortcuts. It's a keyboard-event backstop for visual mode and edit mode. class SuppressPrintable extends Mode constructor: (options = {}) -> handler = (event) => @@ -28,7 +29,7 @@ class SuppressPrintable extends Mode keyup: handler # This watches keyboard events and maintains @countPrefix as number keys and other keys are pressed. -class MaintainCount extends SuppressPrintable +class CountPrefix extends SuppressPrintable constructor: (options) -> super options @@ -61,9 +62,9 @@ forward = "forward" backward = "backward" character = "character" -# This implements movement commands with count prefixes (using MaintainCount) for both visual mode and edit +# This implements movement commands with count prefixes (using CountPrefix) for both visual mode and edit # mode. -class Movement extends MaintainCount +class Movement extends CountPrefix opposite: forward: backward, backward: forward copy: (text) -> |
