diff options
author | Raphael <glephunter@gmail.com> | 2024-02-04 11:12:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-04 11:12:31 +0800 |
commit | 21df0cdb886c09fccafb392949c690ca4af03987 (patch) | |
tree | a0bd9537ed1646965255d5a8a6cd98de12ee8221 /src | |
parent | cd3399f6bd99494c5805ee2560e515ec6c782e59 (diff) | |
download | rneovim-21df0cdb886c09fccafb392949c690ca4af03987.tar.gz rneovim-21df0cdb886c09fccafb392949c690ca4af03987.tar.bz2 rneovim-21df0cdb886c09fccafb392949c690ca4af03987.zip |
vim-patch:9.1.0075: insert completion not correct when adding new leader (#27332)
Problem: insert completion not correct when adding new leader
Solution: Reset compl_curr_match to compl_shown_match
(glepnir)
closes: vim/vim#13957
https://github.com/vim/vim/commit/cbb46b439888e10f87baaca504eafd191723c44b
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/insexpand.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 82b26ba802..2f54250392 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -1294,6 +1294,11 @@ void ins_compl_show_pum(void) pum_display(compl_match_array, compl_match_arraysize, cur, array_changed, 0); 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; + } + if (has_event(EVENT_COMPLETECHANGED)) { trigger_complete_changed_event(cur); } |