Synchronize scrolling and point properly

* eat.el (eat--synchronize-scroll)
(eat--eshell-synchronize-scroll): Call 'set-window-point' in
addition to 'goto-char'.
This commit is contained in:
Akib Azmain Turja 2022-12-11 14:10:25 +06:00
parent ab52caff52
commit 7891cae44b
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

8
eat.el
View file

@ -4756,7 +4756,9 @@ MODE should one of:
"Synchronize scrolling and point between terminal and window."
(when-let* ((window (get-buffer-window (current-buffer))))
(set-window-start
window (eat-term-display-beginning eat--terminal)))
window (eat-term-display-beginning eat--terminal))
(set-window-point
window (eat-term-display-cursor eat--terminal)))
(goto-char (eat-term-display-cursor eat--terminal)))
(defun eat--setup-glyphless-chars ()
@ -5539,7 +5541,9 @@ sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
(if (<= start-line 0)
(eat-term-display-beginning eat--terminal)
(vertical-motion (- start-line))
(point)))))))
(point))))))
(set-window-point
window (eat-term-display-cursor eat--terminal)))
(goto-char (eat-term-display-cursor eat--terminal)))
(defun eat--eshell-update-cwd ()