aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/insexpand.c2
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);
}