aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/commands.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-02-27 17:33:05 +0000
committerStephen Blott2016-03-05 05:38:29 +0000
commit18b8db13fa5184e0cc3ac5fd6645620fdb9d5cef (patch)
tree260ecbb0b01bf6bae2feb882d69258a705728111 /background_scripts/commands.coffee
parent93901aeecc842e563ea95ca3cb1b4e5d396f25dd (diff)
downloadvimium-18b8db13fa5184e0cc3ac5fd6645620fdb9d5cef.tar.bz2
Key bindings; tweaks and fixes.
Diffstat (limited to 'background_scripts/commands.coffee')
-rw-r--r--background_scripts/commands.coffee5
1 files changed, 2 insertions, 3 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index a82a6dcb..2982b861 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -104,10 +104,9 @@ Commands =
for own keys, registryEntry of @keyToCommandRegistry
currentMapping = keyMapping
while 0 < keys.length
- [key, rest] = if 0 == keys.search @namedKeyRegex then [RegExp.$1, RegExp.$2] else [keys[0], keys.slice(1)]
+ [key, rest] = if 0 == keys.search @namedKeyRegex then [RegExp.$1, RegExp.$2] else [keys[0], keys[1..]]
if 0 < rest.length
- currentMapping[key] ?= {}
- currentMapping = currentMapping[key]
+ currentMapping = currentMapping[key] ?= {}
else
currentMapping[key] = registryEntry
keys = rest