Skip to content

Commit 03086af

Browse files
authored
Merge pull request #219 from nickzerjeski/fix-issue-91-optional-mode-line
Add option to keep default mode-line in chat buffers
2 parents 1286d76 + e5f9c43 commit 03086af

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

eca-chat.el

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ This gives full control for powerline or doom-modeline users."
202202
(function :tag "Custom function (receives session)"))
203203
:group 'eca)
204204

205+
(defcustom eca-chat-override-mode-line t
206+
"When non-nil, ECA chat sets a custom mode line for chat buffers.
207+
Set this to nil to keep the default Emacs mode line (including buffer name)."
208+
:type 'boolean
209+
:group 'eca)
210+
205211
(defcustom eca-chat-diff-tool 'smerge
206212
"Select the method for displaying file-change diffs in ECA chat."
207213
:type '(choice (const :tag "Side-by-side Ediff" ediff)
@@ -2156,10 +2162,11 @@ CHILD, NAME, DOCSTRING and BODY are passed down."
21562162
(setq-local corfu-auto-prefix 0))
21572163
(setq-local eca-chat--server-version
21582164
(eca-process--get-current-server-version))
2159-
(setq-local mode-line-format
2160-
(if (functionp eca-chat-mode-line-format)
2161-
(funcall eca-chat-mode-line-format session)
2162-
`(t (:eval (eca-chat--mode-line-string ,session)))))
2165+
(when eca-chat-override-mode-line
2166+
(setq-local mode-line-format
2167+
(if (functionp eca-chat-mode-line-format)
2168+
(funcall eca-chat-mode-line-format session)
2169+
`(t (:eval (eca-chat--mode-line-string ,session))))))
21632170

21642171
;; Tab-line: show a tab for each open chat
21652172
(when eca-chat-tab-line

0 commit comments

Comments
 (0)