summaryrefslogtreecommitdiff
path: root/lisp/org/org-src.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-src.el')
-rw-r--r--lisp/org/org-src.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el
index ba697cc9c42..8cc11965812 100644
--- a/lisp/org/org-src.el
+++ b/lisp/org/org-src.el
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Bastien Guerry <bzg@gnu.org>
;; Dan Davison <davison at stats dot ox dot ac dot uk>
-;; Keywords: outlines, hypermedia, calendar, wp
+;; Keywords: outlines, hypermedia, calendar, text
;; URL: https://orgmode.org
;;
;; This file is part of GNU Emacs.
@@ -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)))