Simplify unneeded if.
This commit is contained in:
parent
a008b488b1
commit
a4f47150b4
@ -383,10 +383,7 @@ class Completer(QObject):
|
|||||||
"""Get the part index of the commandline where the cursor is over."""
|
"""Get the part index of the commandline where the cursor is over."""
|
||||||
cursor_pos = self._cmd.cursorPosition()
|
cursor_pos = self._cmd.cursorPosition()
|
||||||
snippet = slice(cursor_pos - 1, cursor_pos + 1)
|
snippet = slice(cursor_pos - 1, cursor_pos + 1)
|
||||||
if self._cmd.text()[snippet] == ' ':
|
spaces = self._cmd.text()[snippet] == ' '
|
||||||
spaces = True
|
|
||||||
else:
|
|
||||||
spaces = False
|
|
||||||
cursor_pos -= len(self._cmd.prefix())
|
cursor_pos -= len(self._cmd.prefix())
|
||||||
parts = self.split(keep=True)
|
parts = self.split(keep=True)
|
||||||
log.completion.vdebug(
|
log.completion.vdebug(
|
||||||
|
Loading…
Reference in New Issue
Block a user