From fa79212fea1b4a23d5fa14b406ca7c1311e83809 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 15 Jun 2014 11:29:33 +0200 Subject: [PATCH] Don't crash on : --- qutebrowser/widgets/statusbar/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qutebrowser/widgets/statusbar/command.py b/qutebrowser/widgets/statusbar/command.py index 52899d268..3b6837946 100644 --- a/qutebrowser/widgets/statusbar/command.py +++ b/qutebrowser/widgets/statusbar/command.py @@ -105,6 +105,10 @@ class Command(MinimalLineEdit): # When only ":" is entered, we already have one imaginary part, # which just is empty at the moment. return [''] + if not text.strip(): + # Text is only whitespace so we treat this as a single element with + # the whitespace. + return [text] manager = CommandManager() parts = manager.parse(text, fallback=True, alias_no_args=False) if self._empty_item_idx is not None: