This commit is contained in:
Florian Bruhin 2014-06-03 10:44:19 +02:00
parent 3f0682e5a9
commit e294c01d7d
2 changed files with 4 additions and 2 deletions

View File

@ -299,7 +299,8 @@ class CompletionView(QTreeView):
logger.debug("Ignoring completion update")
return
logger.debug("Updating completion, parts: {}, cursor_part {}".format(parts, cursor_part))
logger.debug("Updating completion, parts: {}, cursor_part {}".format(
parts, cursor_part))
if prefix != ':':
# This is a search or gibberish, so we don't need to complete

View File

@ -118,7 +118,8 @@ class Command(MinimalLineEdit):
def _update_cursor_part(self):
"""Get the part index of the commandline where the cursor is over."""
cursor_pos = self.cursorPosition()
if self.text()[cursor_pos-1:cursor_pos+1] == ' ':
snippet = slice(cursor_pos - 1, cursor_pos + 1)
if self.text()[snippet] == ' ':
logger.debug("Cursor between spaces")
spaces = True
else: