Fix :set-cmd-text with empty argument.
This commit is contained in:
parent
4e0712622b
commit
7e51addeb0
@ -127,7 +127,7 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
|
|||||||
# I'm not sure what's the best thing to do here
|
# I'm not sure what's the best thing to do here
|
||||||
# https://github.com/The-Compiler/qutebrowser/issues/123
|
# https://github.com/The-Compiler/qutebrowser/issues/123
|
||||||
text = text.replace('{url}', url)
|
text = text.replace('{url}', url)
|
||||||
if not text[0] in modeparsers.STARTCHARS:
|
if not text or text[0] not in modeparsers.STARTCHARS:
|
||||||
raise cmdexc.CommandError(
|
raise cmdexc.CommandError(
|
||||||
"Invalid command text '{}'.".format(text))
|
"Invalid command text '{}'.".format(text))
|
||||||
self.set_cmd_text(text)
|
self.set_cmd_text(text)
|
||||||
|
Loading…
Reference in New Issue
Block a user