aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-02-21 07:32:20 +0000
committerStephen Blott2016-02-21 07:32:20 +0000
commit1de41f55c121192556a7bf182211fb3b6deeccc8 (patch)
tree06ebf1fe4590e1bbb8cd09330b3582d16c9ee859 /background_scripts/main.coffee
parent972bf7a5e47f6f4abd9db5024914a87f0dad9084 (diff)
downloadvimium-1de41f55c121192556a7bf182211fb3b6deeccc8.tar.bz2
Include count command option in repeat limit.
We need to multiply by `count=N` *before* checking `repeatLimit`. Tweaks #2001.
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee3
1 files changed, 1 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 196cf11f..a4162fc7 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -470,6 +470,7 @@ checkKeyQueue = (keysToCheck, tabId, frameId) ->
if (Commands.keyToCommandRegistry[command])
registryEntry = Commands.keyToCommandRegistry[command]
runCommand = true
+ count *= registryEntry.options.count ? 1
if registryEntry.noRepeat
count = 1
@@ -482,8 +483,6 @@ checkKeyQueue = (keysToCheck, tabId, frameId) ->
"""
if runCommand
- # Account for any command-option "count".
- count *= registryEntry.options.count ? 1
if not registryEntry.isBackgroundCommand
chrome.tabs.sendMessage tabId,
name: "executePageCommand"