summaryrefslogtreecommitdiffstats
path: root/src/insexpand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/insexpand.c')
-rw-r--r--src/insexpand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/insexpand.c b/src/insexpand.c
index c420c0ed93..c1374d3e9c 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1255,6 +1255,12 @@ ins_compl_build_pum(void)
if (match_at_original_text(compl_shown_match))
shown_match_ok = TRUE;
+ if (compl_leader != NULL
+ && STRCMP(compl_leader, compl_orig_text) == 0
+ && shown_match_ok == FALSE)
+ compl_shown_match = compl_no_select ? compl_first_match
+ : compl_first_match->cp_next;
+
i = 0;
compl = compl_first_match;
do