diff options
author | glepnir <glephunter@gmail.com> | 2024-02-03 18:11:13 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-02-03 18:11:13 +0100 |
commit | cbb46b439888e10f87baaca504eafd191723c44b (patch) | |
tree | ff27837487090ca7e16db87742fffc6ee78972de /src/insexpand.c | |
parent | eac3fdcfa0b54281c37ffb66b4d4e8d1072cca1c (diff) |
patch 9.1.0075: insert completion not correct when adding new leaderv9.1.0075
Problem: insert completion not correct when adding new leader
Solution: Reset compl_curr_match to compl_shown_match
(glepnir)
closes: #13957
Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/insexpand.c')
-rw-r--r-- | src/insexpand.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index ba66e51cfb..d712181bcd 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -1363,6 +1363,10 @@ ins_compl_show_pum(void) pum_display(compl_match_array, compl_match_arraysize, cur); curwin->w_cursor.col = col; + // After adding leader, set the current match to shown match. + if (compl_started && compl_curr_match != compl_shown_match) + compl_curr_match = compl_shown_match; + #ifdef FEAT_EVAL if (has_completechanged()) trigger_complete_changed_event(cur); |