mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
vim-patch:9.1.1381: completion: cannot return to original text (#33966)
Problem: Cannot return to the original text after selecting the next
item when the currently selected item is the last one.
Solution: When continuing to move down past the last item, locate the
original completion at the head/tail nodes of the completed
linked list (glepnir).
closes: vim/vim#17300
5a18ccf490
This commit is contained in:
@ -4414,9 +4414,8 @@ static compl_T *find_comp_when_fuzzy(void)
|
||||
assert(compl_match_array != NULL);
|
||||
if ((is_forward && compl_selected_item == compl_match_arraysize - 1)
|
||||
|| (is_backward && compl_selected_item == 0)) {
|
||||
return compl_first_match != compl_shown_match
|
||||
? (is_forward ? compl_shown_match->cp_next : compl_first_match)
|
||||
: (compl_first_match->cp_prev ? compl_first_match->cp_prev : NULL);
|
||||
return match_at_original_text(compl_first_match) ? compl_first_match
|
||||
: compl_first_match->cp_prev;
|
||||
}
|
||||
|
||||
if (is_forward) {
|
||||
|
Reference in New Issue
Block a user