summaryrefslogtreecommitdiff
path: root/qutebrowser
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2021-05-13 06:29:39 -0400
committerRyan Roden-Corrent <ryan@rcorre.net>2021-05-13 06:29:39 -0400
commita36efcf6b5b08666c2a65f8d2eef90eaba832fe6 (patch)
treea623b1d60a247e9a5f4a0eb69b4b6e759c1f30d2 /qutebrowser
parent7a0118119ef92adf1f68c6990ae5cac84aed3fec (diff)
downloadqutebrowser-a36efcf6b5b08666c2a65f8d2eef90eaba832fe6.tar.gz
qutebrowser-a36efcf6b5b08666c2a65f8d2eef90eaba832fe6.zip
Fix crash in cmd completion for set-cmd-text.
2c4bb064e introduced support for showing bindings in the completion menu for commands initiated with set-cmd-text. This would crash if given a binding for just 'set-cmd-text' with no args. Fixes #6453.
Diffstat (limited to 'qutebrowser')
-rw-r--r--qutebrowser/config/config.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py
index 374019677..69f3ca2cc 100644
--- a/qutebrowser/config/config.py
+++ b/qutebrowser/config/config.py
@@ -173,6 +173,8 @@ class KeyConfig:
result = results[0]
if result.cmd.name != "set-cmd-text":
return cmdline
+ if not result.args:
+ return None # doesn't look like this sets a command
*flags, cmd = result.args
if "-a" in flags or "--append" in flags or not cmd.startswith(":"):
return None # doesn't look like this sets a command