[climacs-cvs] CVS update: climacs/gui.lisp climacs/syntax.lisp

Robert Strandh rstrandh at common-lisp.net
Mon Dec 27 16:47:49 UTC 2004


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv26651

Modified Files:
	gui.lisp syntax.lisp 
Log Message:
Patch to get incremental redisplay to work.  There is still a small
problem with the cursor disappearing. 

Thanks to Alastair Bridgewater. 

Date: Mon Dec 27 17:47:46 2004
Author: rstrandh

Index: climacs/gui.lisp
diff -u climacs/gui.lisp:1.20 climacs/gui.lisp:1.21
--- climacs/gui.lisp:1.20	Mon Dec 27 12:32:46 2004
+++ climacs/gui.lisp	Mon Dec 27 17:47:45 2004
@@ -48,7 +48,7 @@
    (win (make-pane 'climacs-pane
 		   :width 900 :height 400
 		   :name 'win
-;;;		   :incremental-redisplay t
+		   :incremental-redisplay t
 		   :display-function 'display-win))
    (int :interactor :width 900 :height 50 :max-height 50))
   (:layouts


Index: climacs/syntax.lisp
diff -u climacs/syntax.lisp:1.8 climacs/syntax.lisp:1.9
--- climacs/syntax.lisp:1.8	Mon Dec 27 12:32:46 2004
+++ climacs/syntax.lisp	Mon Dec 27 17:47:45 2004
@@ -66,11 +66,11 @@
 		 'string)
 	     :stream pane)))
 
-(defmacro maybe-updating-output (stuff &body body)
-  `(progn , at body))
+;;(defmacro maybe-updating-output (stuff &body body)
+;;  `(progn , at body))
 
-;; (defmacro maybe-updating-output (stuff &body body)
-;;   `(updating-output ,stuff , at body))
+ (defmacro maybe-updating-output (stuff &body body)
+   `(updating-output ,stuff , at body))
 
 (defmethod display-line (pane (syntax basic-syntax))
   (with-slots (saved-offset bot scan cursor-x cursor-y space-width tab-width) syntax
@@ -81,12 +81,18 @@
        (macrolet ((output-word (&body body)
 		    `(let ((contents (compute-contents)))
 		       (if (null contents)
-			   (progn , at body)
+			   ,(if body
+				`(maybe-updating-output (pane :unique-id (incf id))
+				  , at body)
+				`(progn))
+			   (progn
 			   (maybe-updating-output (pane :unique-id (incf id)
 							:cache-value contents
 							:cache-test #'string=)
-			     (present-contents contents pane syntax)
-			     , at body)))))
+						    (present-contents contents pane syntax))
+			     ,(when body
+				    `(maybe-updating-output (pane :unique-id (incf id))
+				      , at body)))))))
 	 (loop with id = 0
 	       when (mark= scan (point pane))
 		 do (multiple-value-bind (x y) (stream-cursor-position pane)




More information about the Climacs-cvs mailing list