Remove weird condition when cmd text ends with ' '.

For some reason we checked nargs if split is False. This caused the completion
to not get hidden with ":spawn ". Since this condition makes no sense (and
probably was converted wrong in be467d5e) we remove it here.
This commit is contained in:
Florian Bruhin 2014-07-28 02:27:12 +02:00
parent d60ff5ed27
commit 54c7f29f04

View File

@ -223,8 +223,7 @@ class CommandManager:
self._cmd = cmd
self._args = args
retargs = args[:]
if text.endswith(' ') and (cmd.split is True or
len(args) < cmd.nargs[0]):
if text.endswith(' '):
retargs.append('')
return [cmdstr] + retargs