diff options
| author | Stephen Blott | 2016-02-10 13:52:43 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-02-18 07:35:07 +0000 |
| commit | 201b51e1690bb993aa25a1c11f59afda6eab8747 (patch) | |
| tree | 290c99c4c10a0f4986e830ad077364862799ba2f /background_scripts/commands.coffee | |
| parent | 02adaa7ad0c7921ebab5752470ff7f773802634c (diff) | |
| download | vimium-201b51e1690bb993aa25a1c11f59afda6eab8747.tar.bz2 | |
PassNextKey; allow multiple mappings.
This allows:
map a passNextKey
map b passNextKey
(Previously, we only picked up the first mapping.)
Diffstat (limited to 'background_scripts/commands.coffee')
| -rw-r--r-- | background_scripts/commands.coffee | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index b9a2ef72..7367e696 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -67,16 +67,10 @@ Commands = when "unmapAll" @keyToCommandRegistry = {} - # Push the mapping for passNextKey into Settings so that it's available in the front end for insert mode. - passNextKeyKey = null - for own key of @keyToCommandRegistry - if @keyToCommandRegistry[key].command == "passNextKey" - passNextKeyKey = key - break - if passNextKeyKey - Settings.set "passNextKeyKey", passNextKeyKey - else - Settings.clear "passNextKeyKey" + # Push the key mapping for passNextKey into Settings so that it's available in the front end for insert + # mode. + Settings.set "passNextKeyKeys", + (key for own key of @keyToCommandRegistry when @keyToCommandRegistry[key].command == "passNextKey") clearKeyMappingsAndSetDefaults: -> @keyToCommandRegistry = {} |
