(term-emulate-terminal): Perform redisplay after the process filter
authorChong Yidong <cyd@stupidchicken.com>
Mon, 21 Apr 2008 20:28:45 +0000 (20:28 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 21 Apr 2008 20:28:45 +0000 (20:28 +0000)
has finished running.

lisp/term.el

index 135f74d..4fe3c4d 100644 (file)
@@ -3049,7 +3049,11 @@ See `term-prompt-regexp'."
            (forward-line (- term-buffer-maximum-size))
            (beginning-of-line)
            (delete-region (point-min) (point))))
-       (set-marker save-marker nil)))))
+       (set-marker save-marker nil)))
+    ;; This might be expensive, but we need it to handle something
+    ;; like `sleep 5 | less -c' in more-or-less real time.
+    (when (get-buffer-window (current-buffer))
+      (redisplay))))
 
 (defun term-handle-deferred-scroll ()
   (let ((count (- (term-current-row) term-height)))