diff options
| author | Stephen Blott | 2016-01-31 15:26:46 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-01-31 15:26:46 +0000 |
| commit | aad03c6d834d81d52c99d62f77fa87d0e5b3384f (patch) | |
| tree | 69bd152980938a2e0ce35e58c72299b7f67a3778 /background_scripts/commands.coffee | |
| parent | 8f54de210ebc1109cf9a82eae14296667a37f751 (diff) | |
| download | vimium-aad03c6d834d81d52c99d62f77fa87d0e5b3384f.tar.bz2 | |
Use a count with link hints.
Pass a count to link-hint commands, and the link-hint mode is started that many times (except "with queue").
This resolves the same issue as #1291. However, this:
- does not require re-basing (which is no biggie), and
- keeps all of the count-handling logic (apart from plumbing) in one
place, in `LinkHints.activateMode()`. The link-hints mode itself does
not know anything about count handling.
Serious bug:
- Using `Escape` to exit does not cancel the repeat!
Fixes #1289.
Closes #1291.
Diffstat (limited to 'background_scripts/commands.coffee')
| -rw-r--r-- | background_scripts/commands.coffee | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index a307f23f..d42fd9fb 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -270,7 +270,7 @@ commandDescriptions = toggleViewSource: ["View page source", { noRepeat: true }] copyCurrentUrl: ["Copy the current URL to the clipboard", { noRepeat: true }] - "LinkHints.activateModeToCopyLinkUrl": ["Copy a link URL to the clipboard", { noRepeat: true }] + "LinkHints.activateModeToCopyLinkUrl": ["Copy a link URL to the clipboard", { passCountToFunction: true }] openCopiedUrlInCurrentTab: ["Open the clipboard's URL in the current tab", { background: true }] openCopiedUrlInNewTab: ["Open the clipboard's URL in a new tab", { background: true, repeatLimit: 20 }] @@ -281,12 +281,12 @@ commandDescriptions = focusInput: ["Focus the first text box on the page. Cycle between them using tab", { passCountToFunction: true }] - "LinkHints.activateMode": ["Open a link in the current tab", { noRepeat: true }] - "LinkHints.activateModeToOpenInNewTab": ["Open a link in a new tab", { noRepeat: true }] - "LinkHints.activateModeToOpenInNewForegroundTab": ["Open a link in a new tab & switch to it", { noRepeat: true }] + "LinkHints.activateMode": ["Open a link in the current tab", { passCountToFunction: true }] + "LinkHints.activateModeToOpenInNewTab": ["Open a link in a new tab", { passCountToFunction: true }] + "LinkHints.activateModeToOpenInNewForegroundTab": ["Open a link in a new tab & switch to it", { passCountToFunction: true }] "LinkHints.activateModeWithQueue": ["Open multiple links in a new tab", { noRepeat: true }] - "LinkHints.activateModeToOpenIncognito": ["Open a link in incognito window", { noRepeat: true }] - "LinkHints.activateModeToDownloadLink": ["Download link url", { noRepeat: true }] + "LinkHints.activateModeToOpenIncognito": ["Open a link in incognito window", { passCountToFunction: true }] + "LinkHints.activateModeToDownloadLink": ["Download link url", { passCountToFunction: true }] enterFindMode: ["Enter find mode", { noRepeat: true }] performFind: ["Cycle forward to the next find match"] |
