diff --git a/qutebrowser/completion/completer.py b/qutebrowser/completion/completer.py index 0c83a4976..c5c1915ca 100644 --- a/qutebrowser/completion/completer.py +++ b/qutebrowser/completion/completer.py @@ -157,7 +157,7 @@ class Completer(QObject): result = runner.parse(text, fallback=True, keep=True) parts = [x for x in result.cmdline if x] pos = self._cmd.cursorPosition() - len(self._cmd.prefix()) - pos = min(pos, len(text)) + pos = min(pos, len(text)) # Qt treats 2-byte UTF-16 chars as 2 chars log.completion.debug('partitioning {} around position {}'.format(parts, pos)) for i, part in enumerate(parts):