diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-08-17 11:43:47 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-08-17 12:12:02 +0200 |
commit | 6b30806ebc0aa4823c08bf7af9067b041db51e88 (patch) | |
tree | d6960a1c210f92b22ac10623857e63bfe5458f07 | |
parent | fea22162006c0196a4f256a4608588cda5cd0c6c (diff) | |
download | qutebrowser-6b30806ebc0aa4823c08bf7af9067b041db51e88.tar.gz qutebrowser-6b30806ebc0aa4823c08bf7af9067b041db51e88.zip |
Clean up target list for hinting
-rw-r--r-- | doc/help/commands.asciidoc | 6 | ||||
-rw-r--r-- | qutebrowser/browser/hints.py | 27 |
2 files changed, 23 insertions, 10 deletions
diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index f570a3ffd..0f69841a8 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -679,9 +679,9 @@ Start hinting. * +*-a*+, +*--add-history*+: Whether to add the spawned or yanked link to the browsing history. * +*-r*+, +*--rapid*+: Whether to do rapid hinting. With rapid hinting, the hint mode isn't left after a hint is followed, so you can easily - open multiple links. This is only possible with targets - `tab` (with `tabs.background=true`), `tab-bg`, - `window`, `run`, `hover`, `userscript` and `spawn`. + open multiple links. Note this won't work with targets `tab` + (unless `tabs.background` is set), `tab-fg`, `fill` and + `right-click`. * +*-f*+, +*--first*+: Click the first hinted element without prompting. diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index e127cd10a..a2d628c69 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -684,9 +684,9 @@ class HintManager(QObject): Args: rapid: Whether to do rapid hinting. With rapid hinting, the hint mode isn't left after a hint is followed, so you can easily - open multiple links. This is only possible with targets - `tab` (with `tabs.background=true`), `tab-bg`, - `window`, `run`, `hover`, `userscript` and `spawn`. + open multiple links. Note this won't work with targets `tab` + (unless `tabs.background` is set), `tab-fg`, `fill` and + `right-click`. add_history: Whether to add the spawned or yanked link to the browsing history. first: Click the first hinted element without prompting. @@ -755,10 +755,23 @@ class HintManager(QObject): modeman.leave(self._win_id, usertypes.KeyMode.hint, 're-hinting') if rapid: - if target in [Target.tab_bg, Target.window, Target.run, - Target.hover, Target.userscript, Target.spawn, - Target.download, Target.normal, Target.current, - Target.yank, Target.yank_primary]: + if target in [ + Target.normal, + Target.current, + # Target.tab handled below + # not Target.tab_fg + Target.tab_bg, + Target.window, + Target.yank, + Target.yank_primary, + Target.run, + # not Target.fill + Target.hover, + Target.download, + Target.userscript, + Target.spawn, + # not Target.right_click + ]: pass elif target == Target.tab and config.val.tabs.background: pass |