Fixes to adjusting window sizes (#1590)

This commit is contained in:
Markus Koller
2025-04-16 08:26:07 +02:00
committed by GitHub
parent b61e6571f9
commit 284df877a2

View File

@@ -130,8 +130,6 @@ function Sidebar:open(opts)
vim.g.avante_login = true vim.g.avante_login = true
end end
vim.cmd("wincmd =")
return self return self
end end
@@ -198,8 +196,6 @@ function Sidebar:close(opts)
end end
self:recover_code_winhl() self:recover_code_winhl()
vim.cmd("wincmd =")
end end
function Sidebar:shutdown() function Sidebar:shutdown()
@@ -3062,10 +3058,8 @@ function Sidebar:get_result_container_width()
end end
function Sidebar:adjust_result_container_layout() function Sidebar:adjust_result_container_layout()
local width = self:get_result_container_width()
local height = self:get_result_container_height() local height = self:get_result_container_height()
api.nvim_win_set_width(self.result_container.winid, width)
api.nvim_win_set_height(self.result_container.winid, height) api.nvim_win_set_height(self.result_container.winid, height)
end end