aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-26 12:48:22 -0500
committerCraig Jennings <c@cjennings.net>2026-05-26 12:48:22 -0500
commit052aef8689af897c20e02d069fcdb09490996d2d (patch)
treea5b3e4f823b76a344edc611ee95fa8148cbf452a /pearl.el
parent914ab07da513daebd15c7bc65ac334cde5fbb769 (diff)
downloadpearl-052aef8689af897c20e02d069fcdb09490996d2d.tar.gz
pearl-052aef8689af897c20e02d069fcdb09490996d2d.zip
fix(comments): apply comment highlighting on the bulk render path
Comment headings only got their green (editable) / grey (read-only) coloring after `pearl-refresh-current-issue`, an add-comment, or a view merge (the three paths that call `pearl-highlight-comments`). A plain `pearl-list-issues` rendered through `pearl--update-org-from-issues`, which never called it, so a fresh fetch showed no coloring until I refreshed. I added the highlight call to branches A and B of `pearl--update-org-from-issues`, right after the content lands in the buffer. Branch C defers a dirty buffer without writing, so it stays uncolored. The regression test renders the comment fixture and asserts both headings carry the editability overlay (own to editable, other's to read-only) straight from the bulk render.
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/pearl.el b/pearl.el
index 20e4936..30557a4 100644
--- a/pearl.el
+++ b/pearl.el
@@ -2910,7 +2910,9 @@ just writing the file and leaving it off-screen."
(message "Updated Linear issues in %s with %d active issues"
org-file-path (length issues))
(let ((buf (find-file-noselect org-file-path)))
- (with-current-buffer buf (pearl--restore-page-visibility))
+ (with-current-buffer buf
+ (pearl--restore-page-visibility)
+ (pearl-highlight-comments))
(pearl--surface-buffer buf)))
;; Branch B: buffer exists and is clean -- replace contents in place.
@@ -2924,7 +2926,8 @@ just writing the file and leaving it off-screen."
(insert new-content)
(save-buffer)
(goto-char (min recorded-point (point-max)))
- (pearl--restore-page-visibility)))
+ (pearl--restore-page-visibility)
+ (pearl-highlight-comments)))
(message "Updated Linear issues in %s with %d active issues"
org-file-path (length issues))
(pearl--surface-buffer existing-buf))