changeset 66439:52c79134b5d5

(jit-lock-fontify-now): Be careful not to skip multiline regions when moving the jit-lock-context-unfontify-pos boundary.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 25 Oct 2005 15:26:41 +0000
parents 71a815b63b2b
children 5a126d3f6688
files lisp/jit-lock.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jit-lock.el	Tue Oct 25 13:18:52 2005 +0000
+++ b/lisp/jit-lock.el	Tue Oct 25 15:26:41 2005 +0000
@@ -353,7 +353,12 @@
            ;; what's already been refontified.
            (when (and jit-lock-context-unfontify-pos
                       (< jit-lock-context-unfontify-pos next)
-                      (>= jit-lock-context-unfontify-pos start))
+                      (>= jit-lock-context-unfontify-pos start)
+                      ;; Don't move boundary forward if we have to
+                      ;; refontify previous text.  Otherwise, we risk moving
+                      ;; it past the end of the multiline property and thus
+                      ;; forget about this multiline region altogether.
+                      (not (get-text-property start 'jit-lock-defer-multiline)))
              (setq jit-lock-context-unfontify-pos next))
 
 	   ;; Fontify the chunk, and mark it as fontified.