From 755074947f0dcd62b4fb2ca0bd8df6b861b61208 Mon Sep 17 00:00:00 2001 From: Giuseppe Gadola Date: Sat, 11 Feb 2023 17:50:51 +0100 Subject: feat(animations): set next position based on current action --- lua/pets/pet.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lua/pets/pet.lua') diff --git a/lua/pets/pet.lua b/lua/pets/pet.lua index e5dca4d..424f138 100644 --- a/lua/pets/pet.lua +++ b/lua/pets/pet.lua @@ -31,8 +31,15 @@ function M.Pet.new(name, type, style, row, col) local wd = debug.getinfo(1).source:sub(2):match("(.*nvim/)") .. "media/" instance.sourcedir = wd .. type .. "/" .. style .. "/" - instance.animation = require("pets.animations").Animation.new(instance.sourcedir, type, style, row, col) instance.popup = require("nui.popup")(popup_opts) + instance.animation = require("pets.animations").Animation.new( + instance.sourcedir, + type, + style, + row, + col, + instance.popup.win_config.width + ) return instance end -- cgit v1.3-2-g11bf