aboutsummaryrefslogtreecommitdiff
path: root/lua/pets
diff options
context:
space:
mode:
authorGiuseppe Gadola <giusgadola@gmail.com>2023-02-15 13:21:16 +0100
committerGiuseppe Gadola <giusgadola@gmail.com>2023-02-15 13:21:16 +0100
commit5d248d46f220db79be5c5cfdc29a6167766cee64 (patch)
tree47dc694a59cbab44502a408beae07951fb81f6f1 /lua/pets
parentfix(commands): fixed pets list (diff)
chore: validate row option
Diffstat (limited to 'lua/pets')
-rw-r--r--lua/pets/pet.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/pets/pet.lua b/lua/pets/pet.lua
index 2442eec..f045f70 100644
--- a/lua/pets/pet.lua
+++ b/lua/pets/pet.lua
@@ -42,6 +42,10 @@ end
-- start the animation of the pet
function M.Pet:animate()
+ if self.animation.row <= 0 then
+ vim.notify("Row must be 1 or greater. Check your config", vim.log.levels.ERROR)
+ return
+ end
self.popup:mount()
self.animation:start()
end