From 1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 16 May 2012 17:22:13 +0200 Subject: Put a space after completion only if there is one (and only one) command --- src/tabs.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3