From 5d248d46f220db79be5c5cfdc29a6167766cee64 Mon Sep 17 00:00:00 2001 From: Giuseppe Gadola Date: Wed, 15 Feb 2023 13:21:16 +0100 Subject: chore: validate row option --- lua/pets/pet.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua/pets') 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 -- cgit v1.3-2-g11bf