emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-remark 9f86daaee6 43/75: feat(line):Redraw can now


From: ELPA Syncer
Subject: [elpa] externals/org-remark 9f86daaee6 43/75: feat(line):Redraw can now change the margin side
Date: Fri, 6 Oct 2023 12:59:19 -0400 (EDT)

branch: externals/org-remark
commit 9f86daaee618cdcd60fd0c551cc9bae533a6baac
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>

    feat(line):Redraw can now change the margin side
---
 org-remark-line.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index afccf09cab..59a32e3c61 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -196,6 +196,7 @@ by `overlays-in'."
     spacer-ov))
 
 (defun org-remark-line-highlights-redraw (&optional window)
+  "Redraw line-highlights to adjust the spaces/padding."
   (let ((window (or window (get-buffer-window))))
     (when (and (windowp window) (not (window-minibuffer-p window)))
       (org-with-wide-buffer
@@ -204,8 +205,12 @@ by `overlays-in'."
                           org-remark-highlights)))
          (dolist (ov highlights)
            (let* ((beg (overlay-start ov))
-                  (spacer-ov (org-remark-line-make-spacer-overlay beg)))
-             (push (copy-overlay ov) org-remark-highlights)
+                  (spacer-ov (org-remark-line-make-spacer-overlay beg))
+                  (copied-highlight (copy-overlay ov))
+                  (display-props
+                   (get-text-property 0 'display (overlay-get copied-highlight 
'before-string))))
+             (setf (car display-props) `(margin ,org-remark-line-margin-side))
+             (push copied-highlight org-remark-highlights)
              (copy-overlay spacer-ov)
              (delete-overlay ov)
              (org-remark-highlights-housekeep)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]