Return [''] when splitting empty cmdline

This commit is contained in:
Florian Bruhin 2014-06-03 06:53:37 +02:00
parent 2eb26c96c4
commit 9bee827d52

View File

@ -100,7 +100,9 @@ class Command(MinimalLineEdit):
"""Property to get the text split up in parts."""
text = self.text()[len(self.prefix):]
if not text:
return []
# When only ":" is entered, we already have one imaginary part,
# which just is empty at the moment.
return ['']
logger.debug("Splitting '{}'".format(text))
manager = CommandManager()
parts = manager.parse(text, fallback=True, alias_no_args=False)