[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Thu Jan 3 16:21:23 UTC 2008


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

Modified Files:
	views.lisp 
Log Message:
Buffer-views no longer responsible for updating syntax-view data.


--- /project/mcclim/cvsroot/mcclim/Drei/views.lisp	2008/01/02 14:43:40	1.10
+++ /project/mcclim/cvsroot/mcclim/Drei/views.lisp	2008/01/03 16:21:20	1.11
@@ -555,16 +555,10 @@
 
 (defmethod observer-notified ((view drei-buffer-view) (buffer drei-buffer)
                               changed-region)
-  (with-accessors ((prefix-size prefix-size)
-                   (suffix-size suffix-size)) view
-    (setf prefix-size (min (car changed-region) prefix-size)
-          suffix-size (min (- (size buffer) (cdr changed-region))
-                           suffix-size)
-          (modified-p view) t)
-    (dotimes (i (displayed-lines-count view))
-      (let ((line (line-information view i)))
-        (when (<= (car changed-region) (line-end-offset line))
-          (invalidate-line-strokes line :modified t))))))
+  (dotimes (i (displayed-lines-count view))
+    (let ((line (line-information view i)))
+      (when (<= (car changed-region) (line-end-offset line))
+        (invalidate-line-strokes line :modified t)))))
 
 (defclass drei-syntax-view (drei-buffer-view)
   ((%syntax :accessor syntax)
@@ -651,6 +645,16 @@
       (disable-mode (syntax modual) mode-name)
       (call-next-method)))
 
+(defmethod observer-notified ((view drei-syntax-view) (buffer drei-buffer)
+                              changed-region)
+  (with-accessors ((prefix-size prefix-size)
+                   (suffix-size suffix-size)) view
+    (setf prefix-size (min (car changed-region) prefix-size)
+          suffix-size (min (- (size buffer) (cdr changed-region))
+                           suffix-size)
+          (modified-p view) t))
+  (call-next-method))
+
 (defmethod synchronize-view :around ((view drei-syntax-view) &key
                                      force-p)
   ;; If nothing changed, then don't call the other methods.
@@ -672,8 +676,7 @@
     (setf (prefix-size view) (size (buffer view))
           (suffix-size view) (size (buffer view))
           (buffer-size view) (size (buffer view)))
-    (update-syntax (syntax view) prefix-size suffix-size
-                   begin end)
+    (update-syntax (syntax view) prefix-size suffix-size begin end)
     (call-next-method)))
 
 (defun make-syntax-for-view (view syntax-symbol &rest args)




More information about the Mcclim-cvs mailing list