From 75f6b134911e378cb384e41fd0b9f717341acb2d Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 12 Sep 2020 11:04:21 +0200 Subject: Added recording, Fixing no autocomplete on exact match --- src/suite/suite.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/suite/suite.py') diff --git a/src/suite/suite.py b/src/suite/suite.py index c482c64..ee13268 100644 --- a/src/suite/suite.py +++ b/src/suite/suite.py @@ -6,7 +6,7 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:29 by charles #+# #+# # -# Updated: 2020/09/12 10:38:16 by charles ### ########.fr # +# Updated: 2020/09/12 10:53:42 by charles ### ########.fr # # # # ############################################################################ # @@ -32,12 +32,16 @@ class Suite: if len(asked_names) == 0: asked_names = [s.name for s in cls.available] + suite_names = [s.name for s in cls.available] names = [] for i, name in enumerate(asked_names): - matches = [s.name for s in cls.available - if s.name.find("/") != -1 - and s.name[s.name.find("/") + 1:].startswith(name) - or s.name.startswith(name)] + if name in suite_names: + names.append(name) + continue + matches = [n for n in suite_names + if n.find("/") != -1 + and n[n.find("/") + 1:].startswith(name) + or n.startswith(name)] if len(matches) == 1: names.append(matches[0]) elif len(matches) != 0 and all([n.startswith(name) for n in matches]): -- cgit