Skip to content

Commit

Permalink
fix: cycling list skipping one item
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Nov 27, 2024
1 parent 0b9a128 commit 07b2ee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/blink/cmp/completion/list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function list.select_next()
if list.config.selection ~= 'preselect' then return list.select(nil) end

-- otherwise, we cycle around
list.select(1)
return list.select(1)
end

-- typical case, select the next item
Expand All @@ -135,7 +135,7 @@ function list.select_prev()
if list.config.selection == 'auto_insert' then return list.select(nil) end

-- otherwise, we cycle around
list.select(#list.items)
return list.select(#list.items)
end

-- typical case, select the previous item
Expand Down

0 comments on commit 07b2ee1

Please sign in to comment.