From cf719c7835564a4d808f13e1754b7e38d8ec5add Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Fri, 15 Mar 1991 22:27:32 +0000 Subject: [PATCH] Changed INPUT-METHOD-MACRO to loop calling redisplay until it returns NIL before going into a blocking input wait. Removed the *screen-image-trashed* support, as that has now been pushed down into redisplay. The windowed and TTY input methods are now identical. In the windowed listen, check for input before seving any events. --- hemlock/input.lisp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hemlock/input.lisp b/hemlock/input.lisp index 2941cd3da..111c4aef8 100644 --- a/hemlock/input.lisp +++ b/hemlock/input.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/input.lisp,v 1.1.1.5 1991/03/13 23:24:33 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/input.lisp,v 1.1.1.6 1991/03/15 22:27:32 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -189,7 +189,7 @@ ;;; input method (recursively even). ;;; (eval-when (compile eval) -(defmacro editor-input-method-macro (&optional screen-image-trashed-concern) +(defmacro editor-input-method-macro () `(handler-bind ((error #'(lambda (condition) (let ((device (device-hunk-device (window-hunk (current-window))))) @@ -206,10 +206,8 @@ (dolist (f (variable-value 'ed::input-hook)) (funcall f)) (return)) (invoke-scheduled-events) - (unless (system:serve-event 0) - (internal-redisplay) - ,@(if screen-image-trashed-concern - '((when *screen-image-trashed* (internal-redisplay)))) + (unless (or (system:serve-event 0) + (internal-redisplay)) (when nrw-fun (funcall nrw-fun t)) (let ((wait (next-scheduled-event-wait))) (if wait (system:serve-event wait) (system:serve-event))))) @@ -242,8 +240,9 @@ hunks) ; List of bitmap-hunks which input to this stream. #+clx +;;; There's actually no difference from the TTY case... (defun windowed-get-key-event (stream ignore-abort-attempts-p) - (editor-input-method-macro)) + (tty-get-key-event stream ignore-abort-attempts-p)) #+clx (defun windowed-unget-key-event (key-event stream) @@ -263,13 +262,14 @@ #+clx (defun windowed-listen (stream) - (loop (unless (system:serve-event 0) - ;; If nothing is pending, check the queued input. - (return (not (null (input-event-next (editor-input-head stream)))))) + (loop + ;; Don't service anymore events if we just got some input. (when (input-event-next (editor-input-head stream)) - ;; Don't service anymore events if we just got some input. - (return t)))) - + (return t)) + ;; + ;; If nothing is pending, check the queued input. + (unless (system:serve-event 0) + (return (not (null (input-event-next (editor-input-head stream)))))))) ;;;; Editor input from a tty. @@ -289,7 +289,7 @@ fd) (defun tty-get-key-event (stream ignore-abort-attempts-p) - (editor-input-method-macro t)) + (editor-input-method-macro)) (defun tty-unget-key-event (key-event stream) (un-event key-event stream)) -- GitLab