diff options
author | glepnir <glephunter@gmail.com> | 2024-06-15 15:13:05 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-15 15:27:09 +0200 |
commit | aced8c2f4fd1cf3f8ac7cdb0dd54d19ef4390ef8 (patch) | |
tree | 40736eeb8cd516e3d9fa676cf46e68992d291cab /src/insexpand.c | |
parent | a2324373eb1c3f1777bc40cb6dcd5e895a15fe10 (diff) |
patch 9.1.0489: default completion may break with fuzzyv9.1.0489
Problem: default completion may break with fuzzy
Solution: check that completion_match_array is not null
(glepnir)
closes: #15010
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/insexpand.c')
-rw-r--r-- | src/insexpand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index 7b9a5116d0..e312741658 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -4155,8 +4155,8 @@ find_next_completion_match( { 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))); @@ -4165,8 +4165,8 @@ find_next_completion_match( && 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 |