1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

(comint-postoutput-scroll-to-bottom):

Don't alter point in a window if it's after the process-mark.
This commit is contained in:
Richard M. Stallman 1993-11-10 00:38:47 +00:00
parent 25f91a1e2b
commit 0613507b4f

View File

@ -1197,14 +1197,14 @@ This function should be in the list `comint-output-filter-functions'."
(if (eq (window-buffer window) current)
(progn
(select-window window)
(if (or (eq scroll t) (eq scroll 'all)
;; Maybe user wants point to jump to the end.
(and (eq scroll 'this) (eq selected window))
(and (eq scroll 'others) (not (eq selected window)))
;; If point was at the end, keep it at the end.
(and (>= (point)
(- (process-mark process) (length string)))
(< (point) (process-mark process))))
(if (and (< (point) (process-mark process))
(or (eq scroll t) (eq scroll 'all)
;; Maybe user wants point to jump to the end.
(and (eq scroll 'this) (eq selected window))
(and (eq scroll 'others) (not (eq selected window)))
;; If point was at the end, keep it at the end.
(>= (point)
(- (process-mark process) (length string)))))
(goto-char (process-mark process)))
;; Optionally scroll so that the text
;; ends at the bottom of the window.