diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 22:22:55 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 22:22:55 -0400 |
| commit | 69fee81f00a768a6ab1b91764225710ab885025e (patch) | |
| tree | 475b02cab372757795b1c76ef720a07bf3959044 | |
| parent | 18034d472fcacce8c31919713a1f3c8778b451a8 (diff) | |
| download | dotemacs-69fee81f00a768a6ab1b91764225710ab885025e.tar.gz dotemacs-69fee81f00a768a6ab1b91764225710ab885025e.zip | |
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.
| -rw-r--r-- | modules/eat-config.el | 13 |
1 files changed, 13 insertions, 0 deletions
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-<up>" #'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. |
