diff options
| author | glepnir <glephunter@gmail.com> | 2025-04-04 13:51:38 +0800 |
|---|---|---|
| committer | glepnir <glephunter@gmail.com> | 2025-04-04 13:52:04 +0800 |
| commit | b01921cb55d795cf650c1026c514cb4179a6cada (patch) | |
| tree | e75436498d497ed15482a24d859b610a6d4fd78b /src | |
| parent | 8cf413e450bfbe1a9887f2bbf869bf9462403a77 (diff) | |
| download | rneovim-b01921cb55d795cf650c1026c514cb4179a6cada.tar.gz rneovim-b01921cb55d795cf650c1026c514cb4179a6cada.tar.bz2 rneovim-b01921cb55d795cf650c1026c514cb4179a6cada.zip | |
vim-patch:9.1.1272: completion: in keyword completion Ctrl_P cannot go back after Ctrl_N
Problem: completion: in keyword completion Ctrl_P cannot go back after
Ctrl_N
Solution: in find_compl_when_fuzzy() always return first match of array, after Ctrl_P
use compl_shown_match->cp_next instead of compl_first_match.
(glepnir)
closes: vim/vim#17043
https://github.com/vim/vim/commit/3e50a28a03d136c1e0c1f4fabe50d97faaf08c5c
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/insexpand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 9049b1f298..ce82b7f410 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -4243,7 +4243,7 @@ static compl_T *find_comp_when_fuzzy(void) if ((is_forward && compl_selected_item == compl_match_arraysize - 1) || (is_backward && compl_selected_item == 0)) { return compl_first_match != compl_shown_match - ? compl_first_match + ? (is_forward ? compl_shown_match->cp_next : compl_first_match) : (compl_first_match->cp_prev ? compl_first_match->cp_prev : NULL); } |