From b1f4b1eaba0621ba1d120280661864806574ec42 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 27 Feb 2018 07:40:06 +0100 Subject: [PATCH] Fix :unbind with already bound keys The previous change was incorrect and caused a regression (test_unbound_twice) --- qutebrowser/config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 0a106ea05..f8f9e7902 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -212,7 +212,7 @@ class KeyConfig: bindings_commands = self._config.get_mutable_obj('bindings.commands') - if str(key) in bindings_commands.get(mode, {}): + if val.bindings.commands[mode].get(key, None) is not None: # In custom bindings -> remove it del bindings_commands[mode][str(key)] elif key in val.bindings.default[mode]: