summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/hints.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/browser/hints.py')
-rw-r--r--qutebrowser/browser/hints.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py
index 6ac44adbc..2e4e8e4b4 100644
--- a/qutebrowser/browser/hints.py
+++ b/qutebrowser/browser/hints.py
@@ -299,7 +299,7 @@ class HintActions:
Args:
elem: The QWebElement to download.
- _context: The HintContext to use.
+ context: The HintContext to use.
"""
url = elem.resolve_url(context.baseurl)
if url is None:
@@ -596,6 +596,7 @@ class HintManager(QObject):
"'args' is required with target userscript/spawn/run/"
"fill.")
else:
+ # pylint: disable=else-if-used
if args:
raise cmdutils.CommandError(
"'args' is only allowed with target userscript/spawn.")
@@ -870,12 +871,11 @@ class HintManager(QObject):
label.update_text(matched, rest)
# Show label again if it was hidden before
label.show()
- else:
+ elif (not self._context.rapid or
+ config.val.hints.hide_unmatched_rapid_hints):
# 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.val.hints.hide_unmatched_rapid_hints):
- label.hide()
+ label.hide()
except webelem.Error:
pass
self._handle_auto_follow(keystr=keystr)
@@ -1154,7 +1154,6 @@ class WordHinter:
from the words arg as fallback.
Args:
- words: Words to use as fallback when no link text can be used.
elems: The elements to get hint strings for.
Return: