branch: externals/org-remark commit da73102a2d3da299ae26ed37e280ece1ac7fd82c Author: Noboru Ota <m...@nobiot.com> Commit: Noboru Ota <m...@nobiot.com>
fix(line): When source is narrowed line-hl moves the wrong place --- org-remark-line.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/org-remark-line.el b/org-remark-line.el index 9e3ad39c51..7692829c80 100644 --- a/org-remark-line.el +++ b/org-remark-line.el @@ -5,7 +5,7 @@ ;; Author: Noboru Ota <m...@nobiot.com> ;; URL: https://github.com/nobiot/org-remark ;; Created: 01 August 2023 -;; Last modified: 05 August 2023 +;; Last modified: 06 August 2023 ;; Package-Requires: ((emacs "27.1") (org "9.4")) ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp @@ -184,10 +184,11 @@ end of overlay being identical." ;; always follow the point, keeping the original place unless you ;; directly change the notes. That's not really an intutive behaviour, ;; though in some cases, it imay be useful. - (let* ((ov-start (overlay-start ov)) - (ov-line-bol (org-remark-line-pos-bol ov-start))) - (unless (= ov-start ov-line-bol) - (move-overlay ov ov-line-bol ov-line-bol)))) + (org-with-wide-buffer + (let* ((ov-start (overlay-start ov)) + (ov-line-bol (org-remark-line-pos-bol ov-start))) + (unless (= ov-start ov-line-bol) + (move-overlay ov ov-line-bol ov-line-bol))))) (cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type (eql 'line))) ;; If the icon-string has a display properties, assume it is an icon image