[mcclim-cvs] CVS mcclim/Drei
thenriksen
thenriksen at common-lisp.net
Thu Dec 13 07:30:55 UTC 2007
Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv9906/Drei
Modified Files:
views.lisp
Log Message:
Always update the syntax of a view at least once, even when the buffer
is always empty.
--- /project/mcclim/cvsroot/mcclim/Drei/views.lisp 2007/12/10 21:25:12 1.3
+++ /project/mcclim/cvsroot/mcclim/Drei/views.lisp 2007/12/13 07:30:53 1.4
@@ -560,15 +560,17 @@
bot (make-buffer-mark buffer (size buffer) :right))
;; We resynchronize here, instead of delaying a potentially large
;; reparse until the next time some hapless command (or redisplay
- ;; function) needs a parse tree.
- (synchronize-view view)))
+ ;; function) needs a parse tree. Force the resynchronisation so
+ ;; that even if the buffer is empty, `update-syntax' will still be
+ ;; called.
+ (synchronize-view view :force-p t)))
(defmethod (setf syntax) :after (syntax (view drei-syntax-view))
;; We need to reparse the buffer completely. Might as well do it
;; now.
(setf (prefix-size view) 0
(suffix-size view) 0)
- (synchronize-view view))
+ (synchronize-view view :force-p t))
(defmethod observer-notified ((view drei-syntax-view) (buffer drei-buffer)
changed-region)
@@ -579,9 +581,11 @@
suffix-size)
(modified-p view) t)))
-(defmethod synchronize-view :around ((view drei-syntax-view) &key)
+(defmethod synchronize-view :around ((view drei-syntax-view) &key
+ force-p)
;; If nothing changed, then don't call the other methods.
- (unless (= (prefix-size view) (suffix-size view) (size (buffer view)))
+ (unless (and (= (prefix-size view) (suffix-size view) (size (buffer view)))
+ (not force-p))
(call-next-method)))
(defmethod synchronize-view ((view drei-syntax-view)
More information about the Mcclim-cvs
mailing list