keyconfig: Validate commands *after* transforming

Otherwise we'd still get an error when e.g. transforming :yank-selected
to :yank selection as :yank-selected got removed.
This commit is contained in:
Florian Bruhin 2016-08-07 11:10:46 +02:00
parent a7ffc2c6c0
commit 1b3664d9c8

View File

@ -361,12 +361,12 @@ class KeyConfigParser(QObject):
raise KeyConfigError("Got command '{}' without getting a "
"section!".format(line))
else:
self._validate_command(line)
for rgx, repl in configdata.CHANGED_KEY_COMMANDS:
if rgx.match(line):
line = rgx.sub(repl, line)
self._mark_config_dirty()
break
self._validate_command(line)
self._cur_command = line
def _read_keybinding(self, line):