Skip to content

Commit

Permalink
fix(buffers): ensure current_valid_index is non-nil
Browse files Browse the repository at this point in the history
closes #76
  • Loading branch information
willothy committed Sep 25, 2023
1 parent f9a9d8c commit 52e050a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/cokeline/buffers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ function M.get_valid_buffers()
end)
:tolist()
end
if not current_valid_index then
current_valid_index = 0
end

if type(config.buffers.new_buffers_position) == "function" then
sort(buffers, config.buffers.new_buffers_position)
Expand Down

0 comments on commit 52e050a

Please sign in to comment.