From 62a995889cf8ec69d01ee0c48eebb61c26ea8b62 Mon Sep 17 00:00:00 2001
From: chiles <chiles>
Date: Mon, 11 Nov 1991 18:12:44 +0000
Subject: [PATCH] Fixed REDISPLAY-LOOP to return :editor-input correctly if the
 after-redisplay-method allowed any input to be queued.

---
 hemlock/display.lisp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/hemlock/display.lisp b/hemlock/display.lisp
index efd336971..e0c70c842 100644
--- a/hemlock/display.lisp
+++ b/hemlock/display.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/display.lisp,v 1.7 1991/05/27 12:03:35 chiles Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/display.lisp,v 1.8 1991/11/11 18:12:44 chiles Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -112,7 +112,13 @@
 	     (funcall (device-force-output ,device)))
 	   ,@(if afterp
 		 `((when (device-after-redisplay ,device)
-		     (funcall (device-after-redisplay ,device) ,device))))
+		     (funcall (device-after-redisplay ,device) ,device)
+		     ;; The after method may have queued input that the input
+		     ;; loop won't see until the next input arrives, so check
+		     ;; here to return the correct value as per the redisplay
+		     ;; contract.
+		     (when (listen-editor-input *real-editor-input*)
+		       (setf ,n-res :editor-input)))))
 	   ,n-res)))))
 
 ) ;eval-when
-- 
GitLab