diff options
author | glepnir <glephunter@gmail.com> | 2024-05-27 22:02:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-27 22:02:24 +0800 |
commit | dbc2678f46970703616765dadff1234fdcce27b7 (patch) | |
tree | 3fe50a125a7b0e31a227437d6a49a9eafc4131d6 /src | |
parent | 48251134ee59a3e2f0aeb89608fa820c21b25d4f (diff) | |
download | rneovim-dbc2678f46970703616765dadff1234fdcce27b7.tar.gz rneovim-dbc2678f46970703616765dadff1234fdcce27b7.tar.bz2 rneovim-dbc2678f46970703616765dadff1234fdcce27b7.zip |
vim-patch:9.1.0447: completion may be wrong when deleting all chars (#29040)
Problem: completion may be wrong when deleting all chars.
Solution: reset compl_shown_match (glepnir).
closes: https://github.com/vim/vim/pull/14854
https://github.com/vim/vim/commit/53387c55a13bc1013a6ab721d4bd0bd04c6935c4
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/insexpand.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index b557b9802e..8b1c09b32f 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -1198,6 +1198,10 @@ static int ins_compl_build_pum(void) // match after it, don't highlight anything. bool shown_match_ok = match_at_original_text(compl_shown_match); + if (strequal(compl_leader, compl_orig_text) && !shown_match_ok) { + compl_shown_match = compl_no_select ? compl_first_match : compl_first_match->cp_next; + } + compl_T *shown_compl = NULL; bool did_find_shown_match = false; int cur = -1; |