From 9f0e1a98a0c2bb255c7305984aefc553787ab84b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 26 Feb 2018 20:22:52 +0100 Subject: [PATCH] Make hint keybinding inhibition work --- qutebrowser/keyinput/modeparsers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qutebrowser/keyinput/modeparsers.py b/qutebrowser/keyinput/modeparsers.py index 7237a34de..84eb5baf1 100644 --- a/qutebrowser/keyinput/modeparsers.py +++ b/qutebrowser/keyinput/modeparsers.py @@ -60,8 +60,8 @@ class NormalKeyParser(keyparser.CommandKeyParser): def __repr__(self): return utils.get_repr(self) - def _handle_single_key(self, e): - """Override _handle_single_key to abort if the key is a startchar. + def handle(self, e): + """Override to abort if the key is a startchar. Args: e: the KeyPressEvent from Qt. @@ -69,13 +69,14 @@ class NormalKeyParser(keyparser.CommandKeyParser): Return: A self.Match member. """ - # FIXME rewrite this txt = e.text().strip() if self._inhibited: self._debug_log("Ignoring key '{}', because the normal mode is " "currently inhibited.".format(txt)) return QKeySequence.NoMatch - match = super()._handle_single_key(e) + + match = super().handle(e) + if match == QKeySequence.PartialMatch: timeout = config.val.input.partial_timeout if timeout != 0: