Skip to content

Commit

Permalink
fix(animations): close the timer handle
Browse files Browse the repository at this point in the history
  • Loading branch information
NStefan002 committed Mar 18, 2024
1 parent 5a216ac commit 15465c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/2048/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ function M:animate_down()
vim.schedule_wrap(function()
if steps == 0 then
timer:stop()
timer:close()
self:draw()
return
end
Expand Down Expand Up @@ -1124,6 +1125,7 @@ function M:animate_up()
vim.schedule_wrap(function()
if steps == 0 then
timer:stop()
timer:close()
self:draw()
return
end
Expand Down Expand Up @@ -1179,6 +1181,7 @@ function M:animate_right()
vim.schedule_wrap(function()
if steps == 0 then
timer:stop()
timer:close()
self:draw()
return
end
Expand Down Expand Up @@ -1233,6 +1236,7 @@ function M:animate_left()
vim.schedule_wrap(function()
if steps == 0 then
timer:stop()
timer:close()
self:draw()
return
end
Expand Down

0 comments on commit 15465c5

Please sign in to comment.