From: Stefan Monnier Date: Wed, 20 Dec 2023 22:50:09 +0000 (-0500) Subject: * lisp/org/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40dafa9af0ae3b1826409ebed80cb65f56591ffb;p=emacs.git * lisp/org/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1 --- diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index aadd8eba579..941399e15a5 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -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)))