Skip to content

Commit

Permalink
fix(history): iter() should not return an infinite iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy committed Oct 4, 2023
1 parent 385a8af commit a2217b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/cokeline/history.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function History:iter()
return function()
local buf = self.data[read]
if buf then
read = (read % self.cap) + 1
read = read + 1
return buffers.get_buffer(buf)
end
end
Expand Down

0 comments on commit a2217b1

Please sign in to comment.