Mercurial > emacs
changeset 24936:10d20f341dee
(term-emulate-terminal): Avoid infinite loop
in strange case where minibuffer window is selected but not active.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 09 Jul 1999 02:32:02 +0000 |
parents | 26cd0ba03116 |
children | 42f29912dc46 |
files | lisp/term.el |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/term.el Fri Jul 09 01:59:03 1999 +0000 +++ b/lisp/term.el Fri Jul 09 02:32:02 1999 +0000 @@ -2700,6 +2700,7 @@ (let* ((previous-buffer (current-buffer)) (i 0) char funny count save-point save-marker old-point temp win (selected (selected-window)) + last-win (str-length (length str))) (unwind-protect (progn @@ -2957,6 +2958,11 @@ ;; Scroll each window displaying the buffer but (by default) ;; only if the point matches the process-mark we started with. (setq win selected) + ;; Avoid infinite loop in strange case where minibuffer window + ;; is selected but not active. + (while (window-minibuffer-p win) + (setq win (next-window win nil t))) + (setq last-win win) (while (progn (setq win (next-window win nil t)) (if (eq (window-buffer win) (process-buffer proc)) @@ -2982,7 +2988,7 @@ (save-excursion (goto-char (point-max)) (recenter -1))))) - (not (eq win selected)))) + (not (eq win last-win)))) ;;; Stolen from comint.el and adapted -mm (if (> term-buffer-maximum-size 0)