aboutsummaryrefslogtreecommitdiff
path: root/lua/pets
diff options
context:
space:
mode:
authorGiuseppe Gadola <giusgadola@gmail.com>2023-02-17 16:45:47 +0100
committerGiuseppe Gadola <giusgadola@gmail.com>2023-02-17 16:45:47 +0100
commita064533f569572b14f4ef1231a8a0e8e678ad5c1 (patch)
tree06cf0231fac7bda6b18c4c47411546fc18691565 /lua/pets
parentfix(toggles): fixed pausing while hidden (diff)
fix(toggles): fix pet spawning one row below while paused
Diffstat (limited to 'lua/pets')
-rw-r--r--lua/pets/animations.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/pets/animations.lua b/lua/pets/animations.lua
index a060720..3324b61 100644
--- a/lua/pets/animations.lua
+++ b/lua/pets/animations.lua
@@ -96,7 +96,9 @@ function M.Animation:start()
if not self.state.paused and not self.state.hidden then
M.Animation.start_timer(self)
elseif self.state.paused and not self.state.hidden then
- M.Animation.next_frame(self)
+ vim.schedule(function()
+ M.Animation.next_frame(self)
+ end)
end
end