patch 9.1.0684: completion is inserted on Enter with "noselect"
Problem: completion is inserted on Enter with "noselect"
(Carman Fu)
Solution: check noselect before update compl_shown_match
(glepnir)
fixes: #15526
closes: #15530
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/insexpand.c b/src/insexpand.c
index 9a8d0fa..95076b7 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1311,7 +1311,8 @@
{
did_find_shown_match = TRUE;
max_fuzzy_score = compl->cp_score;
- compl_shown_match = compl;
+ if (!compl_no_select)
+ compl_shown_match = compl;
}
if (!shown_match_ok && compl == compl_shown_match && !compl_no_select)