aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-02-10 13:52:43 +0000
committerStephen Blott2016-02-18 07:35:07 +0000
commit201b51e1690bb993aa25a1c11f59afda6eab8747 (patch)
tree290c99c4c10a0f4986e830ad077364862799ba2f /background_scripts
parent02adaa7ad0c7921ebab5752470ff7f773802634c (diff)
downloadvimium-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')
-rw-r--r--background_scripts/commands.coffee14
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 = {}