From 18b8db13fa5184e0cc3ac5fd6645620fdb9d5cef Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 27 Feb 2016 17:33:05 +0000 Subject: Key bindings; tweaks and fixes. --- background_scripts/commands.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'background_scripts') 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 -- cgit v1.2.3