Add a comment

This commit is contained in:
Florian Bruhin 2016-10-05 21:16:18 +02:00
parent 24eb27e385
commit 6184da0224

View File

@ -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):