From 8fe46079dfd8dbdea7b0834afe807763b9afafbf Mon Sep 17 00:00:00 2001 From: Akib Azmain Turja Date: Fri, 15 Dec 2023 22:22:43 +0600 Subject: [PATCH] Don't let automatic scrolling mess up the display * eat.el (eat-mode, eat--eshell-local-mode): Set both 'scroll-margin' and 'hscroll-margin' to zero. --- eat.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eat.el b/eat.el index ac4826e..ce6dbf0 100644 --- a/eat.el +++ b/eat.el @@ -6582,6 +6582,8 @@ END if it's safe to do so." glyphless-char-display cursor-type track-mouse + scroll-margin + hscroll-margin eat-terminal eat--synchronize-scroll-function eat--mouse-grabbing-type @@ -6604,6 +6606,8 @@ END if it's safe to do so." eat--shell-prompt-annotation-correction-timer)) ;; This is intended; input methods don't work on read-only buffers. (setq buffer-read-only nil) + (setq scroll-margin 0) + (setq hscroll-margin 0) (setq eat--synchronize-scroll-function #'eat--synchronize-scroll) (setq filter-buffer-substring-function #'eat--filter-buffer-substring) @@ -7553,6 +7557,8 @@ symbol `buffer', in which case the point of current buffer is set." :interactive nil (let ((locals '(cursor-type glyphless-char-display + scroll-margin + hscroll-margin track-mouse filter-buffer-substring-function eat-terminal @@ -7565,6 +7571,8 @@ symbol `buffer', in which case the point of current buffer is set." (cond (eat--eshell-local-mode (mapc #'make-local-variable locals) + (setq scroll-margin 0) + (setq hscroll-margin 0) (setq eat--synchronize-scroll-function #'eat--eshell-synchronize-scroll) (setq filter-buffer-substring-function