[climacs-devel] Incremental redisplay
Nyef
nyef at sc.am
Mon Dec 27 16:20:56 UTC 2004
Hello all.
Just spent some time poking around with incremental redisplay. I think I
have it somewhat working now. The only problem I see currently is that
the cursor keeps disappearing. I don't quite know what's up with that.
Anyway, patch attached. I wouldn't recommend checking it in to CVS as
is, but if something could be figured out about the cursor... Perhaps
wrapping the DRAW-LINE* call in a maybe-updating-output?
--
--Alastair Bridgewater
-------------- next part --------------
Index: gui.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/gui.lisp,v
retrieving revision 1.20
diff -u -r1.20 gui.lisp
--- gui.lisp 27 Dec 2004 11:32:46 -0000 1.20
+++ gui.lisp 27 Dec 2004 16:09:00 -0000
@@ -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: syntax.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/syntax.lisp,v
retrieving revision 1.8
diff -u -r1.8 syntax.lisp
--- syntax.lisp 27 Dec 2004 11:32:46 -0000 1.8
+++ syntax.lisp 27 Dec 2004 16:09:00 -0000
@@ -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-devel
mailing list