From 69fee81f00a768a6ab1b91764225710ab885025e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 27 Jun 2026 22:22:55 -0400 Subject: fix(eat): bind zoom-out and reset in eat-semi-char-mode-map In eat-semi-char-mode, C-- was bound to eat-self-input and forwarded to the terminal, so it never reached text-scale-decrease and the font could only grow. A session climbed to text-scale 17 (~20x, unreadable) with no in-buffer way down. Bind C-- to text-scale-decrease and C-0 to a reset helper. C-= and C-+ already passed through. Low cost: the terminal program and tmux don't use Ctrl+-, and C-0 shadows digit-argument inside eat buffers only. --- modules/eat-config.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules') diff --git a/modules/eat-config.el b/modules/eat-config.el index ee83adf10..f53baed31 100644 --- a/modules/eat-config.el +++ b/modules/eat-config.el @@ -479,8 +479,21 @@ pty; without tmux, moves point up in EAT's emacs-mode buffer." (defvar eat-mode-map) (declare-function eat-semi-char-mode "eat") (declare-function eat-self-input "eat") + +(defun cj/eat-text-scale-reset () + "Reset the text scale to its default in the current buffer." + (interactive) + (text-scale-set 0)) + (with-eval-after-load 'eat (keymap-set eat-semi-char-mode-map "C-" #'cj/term-copy-mode-up) + ;; Zoom-out and reset reach Emacs, not the pty. EAT binds C-- to + ;; eat-self-input (forwarded to the terminal), so without this the font can + ;; only grow: C-= / C-+ pass through and zoom in, but C-- never reaches + ;; text-scale-decrease. Low cost -- the Claude TUI and tmux don't use Ctrl+-, + ;; and C-0 shadows digit-argument inside eat buffers only. + (keymap-set eat-semi-char-mode-map "C--" #'text-scale-decrease) + (keymap-set eat-semi-char-mode-map "C-0" #'cj/eat-text-scale-reset) ;; Escape forwards ESC to the pty, so it cancels tmux copy-mode (tmux binds ;; Escape to cancel) and works in TUIs; in EAT's own emacs/char mode it returns ;; to semi-char. One key gets out of either copy view. -- cgit v1.2.3