From d2360de21b0b69323797d642a93a8c0ff478ff84 Mon Sep 17 00:00:00 2001 From: kawre Date: Sun, 5 May 2024 14:16:06 +0200 Subject: [PATCH] fix(input): add missing `winid` --- lua/nui/layout/utils.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/nui/layout/utils.lua b/lua/nui/layout/utils.lua index 157f7a1..aa934c8 100644 --- a/lua/nui/layout/utils.lua +++ b/lua/nui/layout/utils.lua @@ -78,12 +78,14 @@ end ---@return nui_layout_container_info function mod.get_container_info(position) local relative = position.relative + local winid = position.win == 0 and vim.api.nvim_get_current_win() or position.win if relative == "editor" then return { relative = relative, size = utils.get_editor_size(), type = "editor", + winid = winid, } end @@ -91,7 +93,7 @@ function mod.get_container_info(position) relative = position.bufpos and "buf" or relative, size = utils.get_window_size(position.win), type = "window", - winid = position.win == 0 and vim.api.nvim_get_current_win() or position.win, + winid = winid, } end