diff options
| author | Stefan Monnier | 2005-10-25 15:26:41 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-10-25 15:26:41 +0000 |
| commit | 7aaf6f174fd7672545247bd91f0c7eb6bf87fa43 (patch) | |
| tree | 9ef8c6916d84d9022238f88b28bcb9751a9afbf4 | |
| parent | 2e167dc4e36e9045be1c92be959e3a94f2c0978d (diff) | |
| download | emacs-7aaf6f174fd7672545247bd91f0c7eb6bf87fa43.tar.gz emacs-7aaf6f174fd7672545247bd91f0c7eb6bf87fa43.zip | |
(jit-lock-fontify-now): Be careful not to skip multiline
regions when moving the jit-lock-context-unfontify-pos boundary.
| -rw-r--r-- | lisp/jit-lock.el | 7 |
1 files changed, 6 insertions, 1 deletions
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." | |||
| 353 | ;; what's already been refontified. | 353 | ;; what's already been refontified. |
| 354 | (when (and jit-lock-context-unfontify-pos | 354 | (when (and jit-lock-context-unfontify-pos |
| 355 | (< jit-lock-context-unfontify-pos next) | 355 | (< jit-lock-context-unfontify-pos next) |
| 356 | (>= jit-lock-context-unfontify-pos start)) | 356 | (>= jit-lock-context-unfontify-pos start) |
| 357 | ;; Don't move boundary forward if we have to | ||
| 358 | ;; refontify previous text. Otherwise, we risk moving | ||
| 359 | ;; it past the end of the multiline property and thus | ||
| 360 | ;; forget about this multiline region altogether. | ||
| 361 | (not (get-text-property start 'jit-lock-defer-multiline))) | ||
| 357 | (setq jit-lock-context-unfontify-pos next)) | 362 | (setq jit-lock-context-unfontify-pos next)) |
| 358 | 363 | ||
| 359 | ;; Fontify the chunk, and mark it as fontified. | 364 | ;; Fontify the chunk, and mark it as fontified. |