Correct keybindings to deprecated commands.

Needed for #564 (because of :search "").
Also see #525.
This commit is contained in:
Florian Bruhin 2015-04-03 14:14:20 +02:00
parent 18b5512fe9
commit 1dcc5a32d6
2 changed files with 12 additions and 1 deletions

View File

@ -1179,3 +1179,14 @@ KEY_DATA = collections.OrderedDict([
('rl-backward-delete-char', ['<Ctrl-H>']),
])),
])
# A dict of {old_cmd: new_cmd} strings.
CHANGED_KEY_COMMNADS = {
'open -t about:blank': 'open -t',
'open -b about:blank': 'open -b',
'open -w about:blank': 'open -w',
'download-page': 'download',
'cancel-download': 'download-cancel',
}

View File

@ -255,7 +255,7 @@ class KeyConfigParser(QObject):
command = line.split(maxsplit=1)[0]
if command not in cmdutils.cmd_dict:
raise KeyConfigError("Invalid command '{}'!".format(command))
self._cur_command = line
self._cur_command = configdata.CHANGED_KEY_COMMNADS.get(line, line)
def _read_keybinding(self, line):
"""Read a key binding from a line."""