diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index c4ed6db2d..062ce794b 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -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 diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index fd0d5925a..a41249d75 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -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 )), diff --git a/tests/manual/hints/hide_unmatched_rapid_hints.html b/tests/manual/hints/hide_unmatched_rapid_hints.html new file mode 100644 index 000000000..d9535733f --- /dev/null +++ b/tests/manual/hints/hide_unmatched_rapid_hints.html @@ -0,0 +1,25 @@ + + + + + Hide unmatched rapid hints + + +

When hints -> hide-unmatched-rapid-hints 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 #1799).

+

Note that when hinting in number mode, the hints -> hide-unmatched-rapid-hints option affects typing the hint string (number), but not the filter (letters).

+

Here is couple of invalid links to test the behaviour:

+

one

+

two

+

three

+

four

+

five

+

six

+

seven

+

eight

+

nine

+

ten

+

eleven

+

twelve

+

thirteen

+ +