Fix handling of no_cmd_split cmds with args.

When we have something like ":bind x foo;;bar" it wasn't recognized "bind" is a
no_cmd_split command because we tried to look up "bind x foo" in cmd_dict.

See #615.
This commit is contained in:
Florian Bruhin 2015-04-13 07:39:18 +02:00
parent e24b06cdf9
commit d700d18780

View File

@ -261,10 +261,11 @@ class KeyConfigParser(QObject):
"""Check if a given command is valid."""
commands = line.split(';;')
try:
cmd = cmdutils.cmd_dict[commands[0]]
first_cmd = commands[0].split(maxsplit=1)[0].strip()
cmd = cmdutils.cmd_dict[first_cmd]
if cmd.no_cmd_split:
commands = [line]
except KeyError:
except (KeyError, IndexError):
pass
for cmd in commands: