Merge branch 'lahwaacz-fix_hiding_hints'
This commit is contained in:
commit
1980dbb529
@ -28,6 +28,8 @@ Added
|
||||
completion category headers.
|
||||
- New `:debug-log-capacity` command to adjust how many lines are logged into RAM
|
||||
(to report bugs which are difficult to reproduce).
|
||||
- New `hide-unmatched-rapid-hints` option to not hide hint unmatched hint labels
|
||||
in rapid mode.
|
||||
|
||||
Changed
|
||||
~~~~~~~
|
||||
|
@ -147,8 +147,8 @@ Contributors, sorted by the number of commits in descending order:
|
||||
* Bruno Oliveira
|
||||
* Alexander Cogneau
|
||||
* Marshall Lochbaum
|
||||
* Felix Van der Jeugt
|
||||
* Jakub Klinkovský
|
||||
* Felix Van der Jeugt
|
||||
* Martin Tournoij
|
||||
* Jan Verbeek
|
||||
* Raphael Pierzina
|
||||
|
@ -190,6 +190,7 @@
|
||||
|<<hints-next-regexes,next-regexes>>|A comma-separated list of regexes to use for 'next' links.
|
||||
|<<hints-prev-regexes,prev-regexes>>|A comma-separated list of regexes to use for 'prev' links.
|
||||
|<<hints-find-implementation,find-implementation>>|Which implementation to use to find elements to hint.
|
||||
|<<hints-hide-unmatched-rapid-hints,hide-unmatched-rapid-hints>>|Controls hiding unmatched hints in rapid mode.
|
||||
|==============
|
||||
|
||||
.Quick reference for section ``colors''
|
||||
@ -1698,6 +1699,17 @@ Valid values:
|
||||
|
||||
Default: +pass:[python]+
|
||||
|
||||
[[hints-hide-unmatched-rapid-hints]]
|
||||
=== hide-unmatched-rapid-hints
|
||||
Controls hiding unmatched hints in rapid mode.
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
== searchengines
|
||||
Definitions of search engines which can be used via the address bar.
|
||||
The searchengine named `DEFAULT` is used when `general -> auto-search` is true and something else than a URL was entered to be opened. Other search engines can be used by prepending the search engine name to the search term, e.g. `:open google qutebrowser`. The string `{}` will be replaced by the search term, use `{{` and `}}` for literal `{`/`}` signs.
|
||||
|
@ -783,8 +783,11 @@ class HintManager(QObject):
|
||||
# hidden element which matches again -> show it
|
||||
self._show_elem(elem.label)
|
||||
else:
|
||||
# element doesn't match anymore -> hide it
|
||||
self._hide_elem(elem.label)
|
||||
# element doesn't match anymore -> hide it, unless in rapid
|
||||
# mode and hide-unmatched-rapid-hints is false (see #1799)
|
||||
if (not self._context.rapid or
|
||||
config.get('hints', 'hide-unmatched-rapid-hints')):
|
||||
self._hide_elem(elem.label)
|
||||
except webelem.Error:
|
||||
pass
|
||||
|
||||
|
@ -956,6 +956,10 @@ def data(readonly=False):
|
||||
)), 'python'),
|
||||
"Which implementation to use to find elements to hint."),
|
||||
|
||||
('hide-unmatched-rapid-hints',
|
||||
SettingValue(typ.Bool(), 'true'),
|
||||
"Controls hiding unmatched hints in rapid mode."),
|
||||
|
||||
readonly=readonly
|
||||
)),
|
||||
|
||||
|
25
tests/manual/hints/hide_unmatched_rapid_hints.html
Normal file
25
tests/manual/hints/hide_unmatched_rapid_hints.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hide unmatched rapid hints</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>When <code>hints -> hide-unmatched-rapid-hints</code> is set to true (default), rapid hints behave like normal hints, i.e. unmatched hints will be hidden as you type. Setting the option to false will disable hiding in rapid mode, which is sometimes useful (see <a href="https://github.com/The-Compiler/qutebrowser/issues/1799">#1799</a>).</p>
|
||||
<p>Note that when hinting in number mode, the <code>hints -> hide-unmatched-rapid-hints</code> option affects typing the hint string (number), but not the filter (letters).</p>
|
||||
<p>Here is couple of invalid links to test the behaviour:</p>
|
||||
<p><a href="#foo">one</a></p>
|
||||
<p><a href="#foo">two</a></p>
|
||||
<p><a href="#foo">three</a></p>
|
||||
<p><a href="#foo">four</a></p>
|
||||
<p><a href="#foo">five</a></p>
|
||||
<p><a href="#foo">six</a></p>
|
||||
<p><a href="#foo">seven</a></p>
|
||||
<p><a href="#foo">eight</a></p>
|
||||
<p><a href="#foo">nine</a></p>
|
||||
<p><a href="#foo">ten</a></p>
|
||||
<p><a href="#foo">eleven</a></p>
|
||||
<p><a href="#foo">twelve</a></p>
|
||||
<p><a href="#foo">thirteen</a></p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user