Don't autofollow hint when unfiltering w/ rapid

When we are in rapid mode with only one link, after following the hint, fire()
called filter_hints(None) to display all hints again. Then filter_hints tried
to follow that link, fire() tried to show all again, etc., leading to a
RecursionError.

Fixes #1513.

A test will be added via #1510.
This commit is contained in:
Florian Bruhin 2016-05-20 16:41:51 +02:00
parent 107934e4e1
commit 2c42219b23

View File

@ -888,7 +888,9 @@ class HintManager(QObject):
if not visible:
# Whoops, filtered all hints
modeman.leave(self._win_id, usertypes.KeyMode.hint, 'all filtered')
elif len(visible) == 1 and config.get('hints', 'auto-follow'):
elif (len(visible) == 1 and
config.get('hints', 'auto-follow') and
filterstr is not None):
# unpacking gets us the first (and only) key in the dict.
self.fire(*visible)