From 7271955c56633b7d83c2f787d33975e0b830254c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Tue, 9 Aug 2016 10:34:34 +0200 Subject: [PATCH] make hiding unmatched rapid hints configurable --- qutebrowser/browser/hints.py | 5 +++-- qutebrowser/config/configdata.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index be4a621a3..dd68cf383 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -765,8 +765,9 @@ class HintManager(QObject): self._show_elem(elem.label) else: # element doesn't match anymore -> hide it, unless in rapid - # hinting mode (see #1799) - if not self._context.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 df673a50b..bded87801 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 )),