Skip to content

Commit

Permalink
fix(uv): actually we don't want to close
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Oct 13, 2022
1 parent 28ed354 commit 2c6f96d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions lua/gitsigns/debounce.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions teal/gitsigns/debounce.tl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ function M.debounce_trailing(ms: number, fn: function): function
return function(...)
local argv = {...}
timer:start(ms, 0, function()
if not timer:is_closing() then
timer:close()
end
timer:stop()
fn(unpack(argv))
end)
end
Expand All @@ -38,9 +36,7 @@ function M.throttle_leading(ms: number, fn: function): function
if not running then
timer:start(ms, 0, function()
running = false
if not timer:is_closing() then
timer:close()
end
timer:stop()
end)
running = true
fn(...)
Expand Down

0 comments on commit 2c6f96d

Please sign in to comment.