Skip to content
Snippets Groups Projects
Commit 1651e988 authored by ram's avatar ram
Browse files

Added *in-redisplay* flag which inhibits recursive invocations of redisplay

from doing anything.  Recursive invocations can happen in TTY redisplay, since
LISTEN serves events.  Also, made REDISPLAY-WINDOW-FROM-MARK check that we are
in the editor before doing anything.
parent e8727baa
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/display.lisp,v 1.5 1991/03/15 22:23:24 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/display.lisp,v 1.6 1991/03/18 13:23:49 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
manager operation, and thus should be totally refreshed. This is currently manager operation, and thus should be totally refreshed. This is currently
only used by tty redisplay.") only used by tty redisplay.")
;;; True if we are in redisplay, and thus don't want to enter it recursively.
;;;
(defvar *in-redisplay* nil)
(proclaim '(special *window-list*)) (proclaim '(special *window-list*))
(eval-when (compile eval) (eval-when (compile eval)
...@@ -60,7 +64,8 @@ ...@@ -60,7 +64,8 @@
&optional (afterp t)) &optional (afterp t))
(let ((device (gensym)) (point (gensym)) (hunk (gensym)) (let ((device (gensym)) (point (gensym)) (hunk (gensym))
(n-res (gensym))) (n-res (gensym)))
`(let ((,n-res nil)) `(let ((,n-res nil)
(*in-redisplay* t))
(catch 'redisplay-catcher (catch 'redisplay-catcher
(when (listen-editor-input *real-editor-input*) (when (listen-editor-input *real-editor-input*)
(throw 'redisplay-catcher :editor-input)) (throw 'redisplay-catcher :editor-input))
...@@ -102,7 +107,8 @@ ...@@ -102,7 +107,8 @@
(when *things-to-do-once* (when *things-to-do-once*
(dolist (thing *things-to-do-once*) (apply (car thing) (cdr thing))) (dolist (thing *things-to-do-once*) (apply (car thing) (cdr thing)))
(setq *things-to-do-once* nil)) (setq *things-to-do-once* nil))
(cond (*screen-image-trashed* (cond (*in-redisplay* t)
(*screen-image-trashed*
(when (eq (redisplay-all) t) (when (eq (redisplay-all) t)
(setq *screen-image-trashed* nil) (setq *screen-image-trashed* nil)
t)) t))
...@@ -152,7 +158,8 @@ ...@@ -152,7 +158,8 @@
(when *things-to-do-once* (when *things-to-do-once*
(dolist (thing *things-to-do-once*) (apply (car thing) (cdr thing))) (dolist (thing *things-to-do-once*) (apply (car thing) (cdr thing)))
(setq *things-to-do-once* nil)) (setq *things-to-do-once* nil))
(cond (*screen-image-trashed* (cond (*in-redisplay* t)
(*screen-image-trashed*
(when (eq (redisplay-all) t) (when (eq (redisplay-all) t)
(setq *screen-image-trashed* nil) (setq *screen-image-trashed* nil)
t)) t))
...@@ -173,7 +180,8 @@ ...@@ -173,7 +180,8 @@
(when *things-to-do-once* (when *things-to-do-once*
(dolist (thing *things-to-do-once*) (apply (car thing) (cdr thing))) (dolist (thing *things-to-do-once*) (apply (car thing) (cdr thing)))
(setq *things-to-do-once* nil)) (setq *things-to-do-once* nil))
(cond ((listen-editor-input *real-editor-input*)) (cond ((or *in-redisplay* (not *in-the-editor*)) t)
((listen-editor-input *real-editor-input*) :editor-input)
(*screen-image-trashed* (*screen-image-trashed*
(when (eq (redisplay-all) t) (when (eq (redisplay-all) t)
(setq *screen-image-trashed* nil) (setq *screen-image-trashed* nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment