diff --git a/qutebrowser/utils/completer.py b/qutebrowser/utils/completer.py index 5875ec70c..5ab750f9b 100644 --- a/qutebrowser/utils/completer.py +++ b/qutebrowser/utils/completer.py @@ -306,7 +306,7 @@ class Completer(QObject): return try: - pattern = self._parts[self._cursor_part] if self._parts else '' + pattern = self._parts[self._cursor_part].strip() except IndexError: pattern = '' self._model().set_pattern(pattern)