Simplify unneeded if.

This commit is contained in:
Florian Bruhin 2015-11-30 07:00:51 +01:00
parent a008b488b1
commit a4f47150b4

View File

@ -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(