]> git.eshelyaron.com Git - emacs.git/commitdiff
(jit-lock-fontify-now): Be careful not to skip multiline
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 25 Oct 2005 15:26:41 +0000 (15:26 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 25 Oct 2005 15:26:41 +0000 (15:26 +0000)
regions when moving the jit-lock-context-unfontify-pos boundary.

lisp/jit-lock.el

index b76c675cba44047674783d0d99e561a422fb3d38..9e6121c17a144160c0a4609565c4537536f1eeeb 100644 (file)
@@ -353,7 +353,12 @@ Defaults to the whole buffer.  END can be out of bounds."
            ;; 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.