diff options
Diffstat (limited to 'content_scripts/mode_key_handler.coffee')
| -rw-r--r-- | content_scripts/mode_key_handler.coffee | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/content_scripts/mode_key_handler.coffee b/content_scripts/mode_key_handler.coffee index 586f9193..d06bddb5 100644 --- a/content_scripts/mode_key_handler.coffee +++ b/content_scripts/mode_key_handler.coffee @@ -89,6 +89,8 @@ class KeyHandlerMode extends Mode handleKeyChar: (keyChar) -> bgLog "Handling key #{keyChar}, mode=#{@name}." + # A count prefix applies only so long a keyChar is mapped in @keyState[0]; e.g. 7gj should be 1j. + @countPrefix = 0 unless keyChar of @keyState[0] # Advance the key state. The new key state is the current mappings of keyChar, plus @keyMapping. @keyState = [(mapping[keyChar] for mapping in @keyState when keyChar of mapping)..., @keyMapping] command = (mapping for mapping in @keyState when "command" of mapping)[0] |
