From df2c4e8fdf77377c5418474c1e7741152d520a49 Mon Sep 17 00:00:00 2001 From: Sam Tavakoli Date: Fri, 3 Apr 2026 17:37:16 +0100 Subject: [PATCH] fix: prevent `balance-windows` from resizing chat As title, without this change, when running `balance-windows`, even if eca-chat window is a side window, it will try to balance it. An alternative is to not use side window, but the implication then is, your chat constantly is resized when opening/closing buffers. With this fix, your side window size is respected regardless of other buffers/windows. --- eca-chat.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eca-chat.el b/eca-chat.el index 0644472..6c28670 100644 --- a/eca-chat.el +++ b/eca-chat.el @@ -2005,6 +2005,13 @@ CHILD, NAME, DOCSTRING and BODY are passed down." ;; visual-line-mode wraps all lines including tables, breaking their layout. (setq-local word-wrap t) (setq-local truncate-lines nil) + ;; Prevent `balance-windows' from resizing the chat window. + ;; Left/right windows have their width fixed; top/bottom their height. + (when eca-chat-use-side-window + (setq-local window-size-fixed + (if (memq eca-chat-window-side '(left right)) + 'width + 'height))) (hl-line-mode -1) (setq-local eca-chat--history '()) (setq-local eca-chat--history-index -1)