From d700d1878029ac06ac2cb3c45085d188b646c546 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 13 Apr 2015 07:39:18 +0200 Subject: [PATCH] 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. --- qutebrowser/config/parsers/keyconf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/parsers/keyconf.py b/qutebrowser/config/parsers/keyconf.py index 3d9fc6556..824841a21 100644 --- a/qutebrowser/config/parsers/keyconf.py +++ b/qutebrowser/config/parsers/keyconf.py @@ -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: