From 3c4cd4ccdf2f43d8a02e6b9dff400ecca89efa20 Mon Sep 17 00:00:00 2001 From: qiujiandong Date: Mon, 24 Nov 2025 13:20:48 +0800 Subject: [PATCH] feat(terminal): balance window sizes after opening non-float terminal Co-authored-by: Qwen-Coder Automatically balance window sizes using `wincmd =` when opening a terminal in split mode (not floating). This improves the user experience by ensuring consistent window sizing when the terminal is opened as a split pane. Signed-off-by: qiujiandong --- lua/sidekick/cli/terminal.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/sidekick/cli/terminal.lua b/lua/sidekick/cli/terminal.lua index 1053d1d..68b724c 100644 --- a/lua/sidekick/cli/terminal.lua +++ b/lua/sidekick/cli/terminal.lua @@ -375,6 +375,11 @@ function M:open_win() vim.w[self.win].sidekick_cli = self.tool vim.w[self.win].sidekick_session_id = self.id self:wo() + + -- Balance window sizes after opening + if not is_float then + vim.cmd("wincmd =") + end end function M:focus()