From beba5a3d6c985c7494018d54785f7edc52b2b135 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Sun, 17 Jan 2016 20:44:14 +0100 Subject: [PATCH] limit smart hint length --- qutebrowser/browser/hints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 8039174aa..b091e9228 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -1046,7 +1046,8 @@ class WordHinter: match = re.search('[A-Za-z]{3,}', candidate) if not match: continue - if match.end() - match.start() < 4: + length = match.end() - match.start() + if 4 > length or length > 8: continue yield candidate[match.start():match.end()].lower()