diff options
| author | Stephen Blott | 2016-03-26 11:27:55 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-03-26 11:27:55 +0000 | 
| commit | 18b323f96796a02b4ef36b7041a8cac18b0c1fbd (patch) | |
| tree | c5bed84d4ab84790491d4f0d7762c9e5c2019046 | |
| parent | aa8f568c6c3be795c17c3b5107a8a8c70fc6e930 (diff) | |
| download | vimium-18b323f96796a02b4ef36b7041a8cac18b0c1fbd.tar.bz2 | |
Pass count to find commands.
With this change, now *every* front-end command either accepts a count
argument, or or it doesn't accept a count at all.
| -rw-r--r-- | background_scripts/commands.coffee | 4 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 4 | 
2 files changed, 4 insertions, 4 deletions
| diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index b58a3b0c..4785ea47 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -337,8 +337,8 @@ commandDescriptions =    "LinkHints.activateModeToDownloadLink": ["Download link url", { passCountToFunction: true }]    enterFindMode: ["Enter find mode", { noRepeat: true }] -  performFind: ["Cycle forward to the next find match"] -  performBackwardsFind: ["Cycle backward to the previous find match"] +  performFind: ["Cycle forward to the next find match", { passCountToFunction: true }] +  performBackwardsFind: ["Cycle backward to the previous find match", { passCountToFunction: true }]    goPrevious: ["Follow the link labeled previous or <", { noRepeat: true }]    goNext: ["Follow the link labeled next or >", { noRepeat: true }] diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 66eebfdd..0a683083 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -503,8 +503,8 @@ findAndFocus = (backwards) ->    else      HUD.showForDuration("No matches for '#{FindMode.query.rawQuery}'", 1000) -performFind = -> findAndFocus false -performBackwardsFind = -> findAndFocus true +performFind = (count) -> findAndFocus false for [0...count] by 1 +performBackwardsFind = (count) -> findAndFocus true for [0...count] by 1  getLinkFromSelection = ->    node = window.getSelection().anchorNode | 
