aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-26 10:43:28 -0400
committerCraig Jennings <c@cjennings.net>2026-06-26 10:43:28 -0400
commit7b42f3f6928c7d645e5233796142590e980aad84 (patch)
treec59e670092e77b01fed0cd8dd97a25932cc7a9f1 /tests
parent77733b700b586bcc0a76acce8ba75e99987c984d (diff)
downloaddotemacs-7b42f3f6928c7d645e5233796142590e980aad84.tar.gz
dotemacs-7b42f3f6928c7d645e5233796142590e980aad84.zip
feat(eat): tame the viewport bounce from full-frame inline redraws
Claude Code (and any Ink-style inline TUI) moves the terminal cursor up to redraw its whole block and back to the bottom on every tick; EAT follows the cursor with point, so the Emacs window chases it up and down -- the bounce. Add cj/--eat-tame-scroll on eat-mode-hook: scroll-conservatively 101, scroll-margin 0, and auto-window-vscroll nil, so the window line-scrolls minimally instead of recentering. It doesn't remove the bounce (the inline redraw is the root) but makes each jump gentler.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-term-tmux-history.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-term-tmux-history.el b/tests/test-term-tmux-history.el
index 1dbf6b0bf..13e3e1715 100644
--- a/tests/test-term-tmux-history.el
+++ b/tests/test-term-tmux-history.el
@@ -296,5 +296,14 @@ input) instead of moving Emacs point; windmove's S-arrows still reach Emacs."
(dolist (key '("S-<left>" "S-<right>"))
(should-not (eq (keymap-lookup eat-semi-char-mode-map key) #'eat-self-input))))
+(ert-deftest test-term-eat-tame-scroll-sets-minimal-scroll ()
+ "Normal: `cj/--eat-tame-scroll' sets buffer-local minimal-scroll behavior so
+the EAT window line-scrolls instead of recentering on full-frame redraws."
+ (with-temp-buffer
+ (cj/--eat-tame-scroll)
+ (should (= scroll-conservatively 101))
+ (should (= scroll-margin 0))
+ (should (null auto-window-vscroll))))
+
(provide 'test-term-tmux-history)
;;; test-term-tmux-history.el ends here