Put a space after completion only if there is one (and only one) command

This commit is contained in:
mathieui 2012-05-16 17:22:13 +02:00
parent 1263b9be83
commit 1e07cd4f58

View file

@ -216,11 +216,8 @@ class Tab(object):
# one possibily. The next tab will complete the argument.
# Otherwise we would need to add a useless space before being
# able to complete the arguments.
hit_copy = the_input.hit_list[:]
for w in hit_copy[:]:
while hit_copy.count(w) > 1:
hit_copy.remove(w)
if len(hit_copy) in (1, 0):
hit_copy = set(the_input.hit_list)
if len(hit_copy) == 1:
the_input.do_command(' ')
return True
return False