diff --git a/qutebrowser/completion/completer.py b/qutebrowser/completion/completer.py index 08ffd6862..b1d5e71b9 100644 --- a/qutebrowser/completion/completer.py +++ b/qutebrowser/completion/completer.py @@ -383,10 +383,7 @@ class Completer(QObject): """Get the part index of the commandline where the cursor is over.""" cursor_pos = self._cmd.cursorPosition() snippet = slice(cursor_pos - 1, cursor_pos + 1) - if self._cmd.text()[snippet] == ' ': - spaces = True - else: - spaces = False + spaces = self._cmd.text()[snippet] == ' ' cursor_pos -= len(self._cmd.prefix()) parts = self.split(keep=True) log.completion.vdebug(