diff options
Diffstat (limited to 'pearl.el')
| -rw-r--r-- | pearl.el | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -4535,18 +4535,24 @@ highlights first." (remove-overlays (point-min) (point-max) 'pearl-comment t) (goto-char (point-min)) (while (re-search-forward "^\\*+ " nil t) - (let ((comment-id (org-entry-get nil "LINEAR-COMMENT-ID"))) + ;; Point is now just past the leading stars + space. Start the overlay + ;; here, not at the line beginning, so the stars (and the bullet a package + ;; like org-superstar composes from them) keep org's own fontification + ;; instead of being recolored by our face. + (let ((text-start (point)) + (comment-id (org-entry-get nil "LINEAR-COMMENT-ID"))) (when comment-id (let* ((editable (pearl--comment-editable-p (org-entry-get nil "LINEAR-COMMENT-AUTHOR-ID") viewer-id)) (face (if editable 'pearl-editable-comment 'pearl-readonly-comment)) - ;; Editable: heading line only, so your own comment text reads - ;; normally. Read-only: the whole subtree, dimming the body too. + ;; Editable: heading text only, so your own comment reads + ;; normally. Read-only: through the whole subtree, dimming the + ;; body too. (end (if editable (line-end-position) (save-excursion (org-end-of-subtree t t) (point)))) - (ov (make-overlay (line-beginning-position) end))) + (ov (make-overlay text-start end))) (overlay-put ov 'pearl-comment t) (overlay-put ov 'face face))))))) |
