]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-postoutput-scroll-to-bottom):
authorRichard M. Stallman <rms@gnu.org>
Wed, 10 Nov 1993 00:38:47 +0000 (00:38 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 10 Nov 1993 00:38:47 +0000 (00:38 +0000)
Don't alter point in a window if it's after the process-mark.

lisp/comint.el

index 771be5e5838d6c612eca7506f7c9cb81c0e4e279..dd0e61559fa473b5652bd78d3f4f32d22159a391 100644 (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.