summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-05-16 17:22:13 +0200
committermathieui <mathieui@mathieui.net>2012-05-16 17:22:13 +0200
commit1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74 (patch)
treef881a57c42e1874992a73d638075b8130c210019 /src
parent1263b9be835868367d44fe442346dfc0e57c3261 (diff)
downloadpoezio-1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74.tar.gz
poezio-1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74.tar.bz2
poezio-1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74.tar.xz
poezio-1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74.zip
Put a space after completion only if there is one (and only one) command
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tabs.py b/src/tabs.py
index be8085e8..1ac301a1 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -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