Backport commit 40dafa9af from Emacs

* lisp/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1
40dafa9af0ae3b1826409ebed80cb65f56591ffb
Stefan Monnier
Wed Dec 20 17:50:09 2023 -0500
This commit is contained in:
Stefan Monnier 2023-12-20 17:50:09 -05:00 committed by Kyle Meyer
parent 1bff87bdb7
commit 68f9abe0cd
1 changed files with 5 additions and 2 deletions

View File

@ -658,7 +658,9 @@ as `org-src-fontify-natively' is non-nil."
(when new-prop
(if (not (eq prop 'invisible))
(put-text-property
(+ start (1- pos)) (1- (+ start next)) prop new-prop
(+ start (- pos (point-min)))
(+ start (- next (point-min)))
prop new-prop
org-buffer)
;; Special case. `invisible' text property may
;; clash with Org folding. Do not assign
@ -690,7 +692,8 @@ as `org-src-fontify-natively' is non-nil."
(when invisibility-spec
(add-to-invisibility-spec invisibility-spec))
(put-text-property
(+ start (1- pos)) (1- (+ start next))
(+ start (- pos (point-min)))
(+ start (- next (point-min)))
'org-src-invisible new-prop
org-buffer)))))))
(setq pos next)))