org-fontify-extend-region: Fix edge case
* lisp/org.el (org-fontify-extend-region): Extend region for an extra character, just as `font-lock-extend-jit-lock-region-after-change' does. This fixes a reported edge case. Also, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68849 Reported-by: Kostas Papadakis <papadakis.k@yandex.com> Link: https://orgmode.org/list/c5fb9f63-185c-4e36-b13f-e887a4a29aae@yandex.com
This commit is contained in:
parent
97f4ae0c2d
commit
1abff38597
|
@ -5524,7 +5524,9 @@ by a #."
|
|||
|
||||
(defun org-fontify-extend-region (beg end _old-len)
|
||||
(let ((end (if (progn (goto-char end) (looking-at-p "^[*#]"))
|
||||
(1+ end) end))
|
||||
(min (point-max) (1+ end))
|
||||
;; See `font-lock-extend-jit-lock-region-after-change' and bug#68849.
|
||||
(min (point-max) (1+ end))))
|
||||
(begin-re "\\(\\\\\\[\\|\\(#\\+begin_\\|\\\\begin{\\)\\S-+\\)")
|
||||
(end-re "\\(\\\\\\]\\|\\(#\\+end_\\|\\\\end{\\)\\S-+\\)")
|
||||
(extend
|
||||
|
|
Loading…
Reference in New Issue