mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.1.0489: default completion may break with fuzzy (#29364)
Problem: default completion may break with fuzzy
Solution: check that completion_match_array is not null
(glepnir)
closes: vim/vim#15010
aced8c2f4f
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -3698,16 +3698,16 @@ static int find_next_completion_match(bool allow_get_expansion, int todo, bool a
|
||||
|
||||
while (--todo >= 0) {
|
||||
if (compl_shows_dir_forward() && compl_shown_match->cp_next != NULL) {
|
||||
compl_shown_match = !compl_fuzzy_match ? compl_shown_match->cp_next
|
||||
: find_comp_when_fuzzy();
|
||||
compl_shown_match = compl_fuzzy_match && compl_match_array != NULL
|
||||
? find_comp_when_fuzzy() : compl_shown_match->cp_next;
|
||||
found_end = (compl_first_match != NULL
|
||||
&& (is_first_match(compl_shown_match->cp_next)
|
||||
|| is_first_match(compl_shown_match)));
|
||||
} else if (compl_shows_dir_backward()
|
||||
&& compl_shown_match->cp_prev != NULL) {
|
||||
found_end = is_first_match(compl_shown_match);
|
||||
compl_shown_match = !compl_fuzzy_match ? compl_shown_match->cp_prev
|
||||
: find_comp_when_fuzzy();
|
||||
compl_shown_match = compl_fuzzy_match && compl_match_array != NULL
|
||||
? find_comp_when_fuzzy() : compl_shown_match->cp_prev;
|
||||
found_end |= is_first_match(compl_shown_match);
|
||||
} else {
|
||||
if (!allow_get_expansion) {
|
||||
|
Reference in New Issue
Block a user