From a2217b14ad034894fa1aff5197def3fb04aaafc7 Mon Sep 17 00:00:00 2001 From: Will Hopkins Date: Wed, 4 Oct 2023 16:00:37 -0700 Subject: [PATCH] fix(history): iter() should not return an infinite iterator --- lua/cokeline/history.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cokeline/history.lua b/lua/cokeline/history.lua index a6b37ab..f9aab0c 100644 --- a/lua/cokeline/history.lua +++ b/lua/cokeline/history.lua @@ -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