1 parent 2fb6416 commit 6ab7d2fCopy full SHA for 6ab7d2f
1 file changed
lua/opencode/util.lua
@@ -352,10 +352,10 @@ function M.format_cost(c)
352
end
353
354
function M.debounce(func, delay)
355
- local timer = nil
+ local timer ---@type uv.uv_timer_t?
356
return function(...)
357
- if timer then
358
- timer:stop()
+ if timer and not timer:is_closing() then
+ timer:close()
359
360
local args = { ... }
361
timer = vim.defer_fn(function()
0 commit comments