
Update of /project/climacs/cvsroot/climacs In directory common-lisp.net:/tmp/cvs-serv19246 Modified Files: syntax.lisp Log Message: Redisplay is much faster. Date: Mon Jan 3 16:07:09 2005 Author: rstrandh Index: climacs/syntax.lisp diff -u climacs/syntax.lisp:1.18 climacs/syntax.lisp:1.19 --- climacs/syntax.lisp:1.18 Mon Jan 3 13:21:20 2005 +++ climacs/syntax.lisp Mon Jan 3 16:07:09 2005 @@ -265,10 +265,19 @@ (with-slots (top bot scan cache cursor-x cursor-y) syntax (position-window pane syntax) (compute-cache pane syntax) - (setf scan (offset top)) - (loop for id from 0 below (nb-elements cache) - do (updating-output (pane :unique-id id) - (display-line pane syntax (element* cache id)))) + (loop with start-offset = (offset top) + for id from 0 below (nb-elements cache) + do (setf scan start-offset) + (updating-output + (pane :unique-id id + :cache-value (if (<= start-offset + (offset (point pane)) + (+ start-offset (length (element* cache id)))) + (cons nil nil) + (element* cache id)) + :cache-test #'eq) + (display-line pane syntax (element* cache id))) + (incf start-offset (1+ (length (element* cache id))))) (when (mark= scan (point pane)) (multiple-value-bind (x y) (stream-cursor-position pane) (setf cursor-x x