[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Sun Jan 27 10:46:54 UTC 2008


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

Modified Files:
	drei-clim.lisp drei-redisplay.lisp 
Log Message:
Don't redisplay cursor if the associated view has not been displayed yet.


--- /project/mcclim/cvsroot/mcclim/Drei/drei-clim.lisp	2008/01/27 09:36:07	1.33
+++ /project/mcclim/cvsroot/mcclim/Drei/drei-clim.lisp	2008/01/27 10:46:53	1.34
@@ -189,10 +189,12 @@
 
 (defmethod visible-1 and (cursor (view drei-buffer-view))
   ;; We should only redisplay when the cursor is on display, or
-  ;; `offset-to-screen-position' will return a non-number.
-  (<= (offset (top view))
-      (offset (mark cursor))
-      (offset (bot view))))
+  ;; `offset-to-screen-position' will return a non-number. Also don't
+  ;; display if the view hasn't been displayed yet.
+  (and (<= (offset (top view))
+           (offset (mark cursor))
+           (offset (bot view)))
+       (plusp (displayed-lines-count view))))
 
 (defmethod (setf view) :after (new-val (drei drei-pane))
   (window-clear drei))
--- /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp	2008/01/27 09:36:07	1.50
+++ /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp	2008/01/27 10:46:53	1.51
@@ -920,7 +920,7 @@
 (defmethod display-drei-view-cursor :around ((stream extended-output-stream)
                                              (view drei-buffer-view)
                                              (cursor drei-cursor))
-  (when (<= (offset (top view)) (offset (mark cursor)) (offset (bot view)))
+  (when (visible-p cursor)
     (clear-output-record cursor)
     (prog1 (call-next-method)
       (with-bounding-rectangle* (x1 y1 x2 y2) cursor
@@ -1021,8 +1021,7 @@
   (declare (ignore x-offset y-offset region))
   (clear-output-record cursor)
   (with-output-recording-options (stream :record t :draw t)
-    (when (visible-p cursor)
-      (display-drei-view-cursor stream (view cursor) cursor))))
+    (display-drei-view-cursor stream (view cursor) cursor)))
 
 (defun display-drei-area (drei)
   (with-accessors ((stream editor-pane) (view view)) drei




More information about the Mcclim-cvs mailing list