From 18bcae40c597e77799880b418b8c10411564bf0e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 9 Apr 2014 21:15:18 +0200 Subject: [PATCH] Fix completing when text ends with space #2 --- qutebrowser/commands/parsers.py | 2 ++ qutebrowser/widgets/completion.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/commands/parsers.py b/qutebrowser/commands/parsers.py index fabbc35ea..82e502339 100644 --- a/qutebrowser/commands/parsers.py +++ b/qutebrowser/commands/parsers.py @@ -240,4 +240,6 @@ def split_cmdline(text): parts = parser.parse(text) except NoSuchCommandError: parts = text.split(' ') + if text.endswith(' '): + parts.append('') return parts diff --git a/qutebrowser/widgets/completion.py b/qutebrowser/widgets/completion.py index f9f349f1b..aadd1ba02 100644 --- a/qutebrowser/widgets/completion.py +++ b/qutebrowser/widgets/completion.py @@ -220,8 +220,6 @@ class CompletionView(QTreeView): text = text.lstrip(':') parts = split_cmdline(text) - if text.endswith(' '): - parts.append('') model = self._get_new_completion(parts) if model != self._lastmodel: