branch: externals/org-remark
commit eb6456d7f99b3dd3361b810959e5134524c18cc7
Author: Noboru Ota <[email protected]>
Commit: Noboru Ota <[email protected]>

    docs(notes-sync): add FIXME comment for the previous commit
---
 org-remark.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index 437b5a894b..16ad4d05c0 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1078,7 +1078,12 @@ Trigger by on-save of the notes."
                (end (cdr location))
                (id (plist-get highlight :id))
                (ov (org-remark-find-overlay-in beg end id)))
-          (delete-overlay ov)
+          ;; FIXME Currently the when clause is used to guard against
+          ;; the case where a highlight overlay is not found.  It should
+          ;; be an edge case but the highlight could have moved to a
+          ;; completely new location where the old location does not
+          ;; overlap with the new location at all.
+          (when ov (delete-overlay ov))
           (org-remark-highlight-load highlight))))))
 
 (defun org-remark-notes-sync-with-source ()

Reply via email to