changeset 32531:2555cdee2fed

(jit-lock-after-change): If we're in text that matches a multi-line font-lock pattern, make sure the whole text will be redisplayed.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 16 Oct 2000 13:04:34 +0000
parents e56c929c9908
children 61d4de9a4e35
files lisp/jit-lock.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jit-lock.el	Mon Oct 16 13:04:06 2000 +0000
+++ b/lisp/jit-lock.el	Mon Oct 16 13:04:34 2000 +0000
@@ -420,12 +420,20 @@
   (when jit-lock-mode
     (save-excursion
       (with-buffer-prepared-for-jit-lock
+       ;; If we're in text that matches a multi-line font-lock pattern,
+       ;; make sure the whole text will be redisplayed.
+       (when (get-text-property start 'font-lock-multiline)
+	 (setq start (or (previous-single-property-change
+			  start 'font-lock-multiline)
+			 (point-min))))
+       
        ;; It's important that the `fontified' property be set from the
        ;; beginning of the line, else font-lock will properly change the
        ;; text's face, but the display will have been done already and will
        ;; be inconsistent with the buffer's content.
        (goto-char start)
        (setq start (line-beginning-position))
+       
        ;; Make sure we change at least one char (in case of deletions).
        (setq end (min (max end (1+ start)) (point-max)))
        ;; Request refontification.