Fix :unbind with already bound keys

The previous change was incorrect and caused a regression (test_unbound_twice)
This commit is contained in:
Florian Bruhin 2018-02-27 07:40:06 +01:00
parent 49f8bc3d63
commit b1f4b1eaba

View File

@ -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]: