[mcclim-cvs] CVS mcclim

thenriksen thenriksen at common-lisp.net
Sat Apr 19 09:26:50 UTC 2008


Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv11778

Modified Files:
	presentation-defs.lisp 
Log Message:
Fixed STRING-INPUT-EDITING-STREAM to not fail on many common use cases.


--- /project/mcclim/cvsroot/mcclim/presentation-defs.lisp	2008/04/19 07:51:22	1.76
+++ /project/mcclim/cvsroot/mcclim/presentation-defs.lisp	2008/04/19 09:26:49	1.77
@@ -1047,12 +1047,13 @@
 
 (defmethod stream-read-gesture ((stream string-input-editing-stream)
                                 &key peek-p &allow-other-keys)
-  (prog1 (if (= (stream-scan-pointer stream) (length (stream-input-buffer stream)))
-             (second (first (gethash (first *activation-gestures*)
-                                     climi::*gesture-names*))) ; XXX - will always be non-NIL?
-             (aref (stream-input-buffer stream) (stream-scan-pointer stream)))
-    (unless peek-p
-      (incf (stream-scan-pointer stream)))))
+  (unless (> (stream-scan-pointer stream) (length (stream-input-buffer stream)))
+    (prog1 (if (= (stream-scan-pointer stream) (length (stream-input-buffer stream)))
+               (second (first (gethash (first *activation-gestures*)
+                                       climi::*gesture-names*))) ; XXX - will always be non-NIL?
+               (aref (stream-input-buffer stream) (stream-scan-pointer stream)))
+      (unless peek-p
+        (incf (stream-scan-pointer stream))))))
 
 (defmethod stream-unread-gesture ((stream string-input-editing-stream) gesture)
   (decf (stream-scan-pointer stream)))




More information about the Mcclim-cvs mailing list