From: Stefan Monnier Date: Tue, 25 Oct 2005 15:26:41 +0000 (+0000) Subject: (jit-lock-fontify-now): Be careful not to skip multiline X-Git-Tag: emacs-pretest-22.0.90~6294 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7aaf6f174fd7672545247bd91f0c7eb6bf87fa43;p=emacs.git (jit-lock-fontify-now): Be careful not to skip multiline regions when moving the jit-lock-context-unfontify-pos boundary. --- diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index b76c675cba4..9e6121c17a1 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -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.