summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-10 00:38:47 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-10 00:38:47 +0000
commit0613507b4fc1f5fdb73fc4e98288413d77848c9f (patch)
tree2f6930a016e4ca5cf2d098855315f1f90874b1e9 /lisp/comint.el
parent25f91a1e2bd5271c84bb5697f4d4589f789187c5 (diff)
downloademacs-0613507b4fc1f5fdb73fc4e98288413d77848c9f.tar.gz
(comint-postoutput-scroll-to-bottom):
Don't alter point in a window if it's after the process-mark.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 771be5e5838..dd0e61559fa 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -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.