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.
This commit is contained in:
Akib Azmain Turja 2023-12-15 22:22:43 +06:00
parent 5aaad960c8
commit 8fe46079df
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

8
eat.el
View file

@ -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