diff options
| author | Giuseppe Gadola <giusgadola@gmail.com> | 2023-02-11 17:50:51 +0100 |
|---|---|---|
| committer | Giuseppe Gadola <giusgadola@gmail.com> | 2023-02-11 17:50:51 +0100 |
| commit | 755074947f0dcd62b4fb2ca0bd8df6b861b61208 (patch) | |
| tree | 51bd1008d87036078a797319746ef3e24f09a0dd /lua/pets/pet.lua | |
| parent | feat(pets): don't allow duplicate names (diff) | |
feat(animations): set next position based on current action
Diffstat (limited to 'lua/pets/pet.lua')
| -rw-r--r-- | lua/pets/pet.lua | 9 |
1 files changed, 8 insertions, 1 deletions
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 |