Skip to content

Commit b3f8a44

Browse files
committed
fix(internal-link): internal-link src overlay gets dislocated by 1
This was because the transclusion forward-char by 1 and it's in the same buffer, thus also moving the range of source by 1 point. Previously, the point number was used; now changed the central 'org-transclusion-add' function changed to make marker so that the marker moves by 1 automatically. Regression tested OK for other text files and org files
1 parent 566f2de commit b3f8a44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

org-transclusion.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
;; Author: Noboru Ota <[email protected]>
1919
;; Created: 10 October 2020
20-
;; Last modified: 08 May 2023
20+
;; Last modified: 09 May 2023
2121

2222
;; URL: https://github.com/nobiot/org-transclusion
2323
;; Keywords: org-mode, transclusion, writing
@@ -430,8 +430,8 @@ does not support all the elements.
430430
'org-transclusion-add-functions link keyword-plist))
431431
(tc-type (plist-get payload :tc-type))
432432
(src-buf (plist-get payload :src-buf))
433-
(src-beg (plist-get payload :src-beg))
434-
(src-end (plist-get payload :src-end))
433+
(src-beg (set-marker (make-marker) (plist-get payload :src-beg) src-buf))
434+
(src-end (set-marker (make-marker) (plist-get payload :src-end) src-buf))
435435
(src-content (plist-get payload :src-content)))
436436
(if (or (string= src-content "")
437437
(eq src-content nil))

0 commit comments

Comments
 (0)