fix crash on empty parts[] (#1523)

This commit is contained in:
Nick Ginther 2016-05-25 16:45:06 -05:00
parent 20cfadbda7
commit 2065f292ab

View File

@ -204,6 +204,8 @@ class Completer(QObject):
parts, cursor_part = self._filter_cmdline_parts(parts, cursor_part)
log.completion.debug("After filtering flags: parts {}, cursor_part "
"{}".format(parts, cursor_part))
if not parts:
return None
if cursor_part == 0:
# '|' or 'set|'
model = instances.get(usertypes.Completion.command)