diff options
| author | Stephen Blott | 2016-02-28 06:48:03 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-03-05 05:38:30 +0000 | 
| commit | f89b58f04af3eae05de9e999c39b2fe047fe6f4a (patch) | |
| tree | 6a544ed83a8452507b1a929a48026d14294c6c84 /content_scripts/mode.coffee | |
| parent | 18b8db13fa5184e0cc3ac5fd6645620fdb9d5cef (diff) | |
| download | vimium-f89b58f04af3eae05de9e999c39b2fe047fe6f4a.tar.bz2 | |
Key bindings; more tweaks and fixes.
Miscellaneous fixes and tweaks, including:
- Reinstate key logging.
- Fix count handling in line with expected behaviour in #2024.
- Remove `noCount` option; we don't need it.
- Simplify logic in various places.
Fixes #2024.
Diffstat (limited to 'content_scripts/mode.coffee')
| -rw-r--r-- | content_scripts/mode.coffee | 11 | 
1 files changed, 2 insertions, 9 deletions
| diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 454a6ed9..efbc9cf4 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -120,20 +120,13 @@ class Mode          singletons[key] = this      # If @options.trackState is truthy, then the mode mainatins the current state in @enabled and @passKeys, -    # and calls @registerStateChange() (if defined) whenever the state changes. The mode also tracks the -    # current keyQueue in @keyQueue. +    # and calls @registerStateChange() (if defined) whenever the state changes.      if @options.trackState        @enabled = false        @passKeys = "" -      @keyQueue = ""        @push          _name: "mode-#{@id}/registerStateChange" -        registerStateChange: ({ enabled: enabled, passKeys: passKeys }) => @alwaysContinueBubbling => -          if enabled != @enabled or passKeys != @passKeys -            @enabled = enabled -            @passKeys = passKeys -            @registerStateChange?() -        registerKeyQueue: ({ keyQueue: keyQueue }) => @alwaysContinueBubbling => @keyQueue = keyQueue +        registerStateChange: ({ enabled: @enabled, passKeys: @passKeys }) => @alwaysContinueBubbling =>      # If @options.passInitialKeyupEvents is set, then we pass initial non-printable keyup events to the page      # or to other extensions (because the corresponding keydown events were passed).  This is used when | 
