Repository navigation
Fix reaction count fg lost after kitty image placement - #134
Conversation
The kitty unicode-placeholder placement encodes the image ID in the fg color and resets with \e[39m afterward, which wipes the pill style's foreground before the count digit prints. Re-assert the style's fg between the placement and the count so the own-reaction green (and other pill colors) survive the image path. Fixes gammons#133
gammons
left a comment
There was a problem hiding this comment.
Thanks @achin90 — the fix looks correct and the diagnosis (kitty placement's \e[39m wiping the pill fg) matches the code. The CI failure is an unrelated flake in internal/slack/membership, so a re-run should go green.
One request before merging: could you add a test covering this? The pill render loops in internal/ui/messages already have test infrastructure, and this is exactly the kind of regression that will silently come back. A test with a stubbed fetcher/placement asserting the count keeps the pill fg would do it.
Nit: the two copies diverge slightly (strconv.Itoa in messages vs fmt.Sprintf in thread) — keeping them identical helps since the loops are duplicated.
|
Thanks for the review @gammons! Had a lot of fun hacking on the project over the weekend... ended up with a stack of 14 changes to daily drive it at work today 😄 |
|
thanks @achin90 ! |
Fixes #133
The kitty unicode-placeholder encodes the image ID in the fg color and resets with
\e[39mafterward, which wipes the pill style's foreground before the count digit prints. This re-asserts the style's fg between the placement and the count so the own-reaction green (and other pill colors) survive the image path.Applied in both
internal/ui/messages/model.goandinternal/ui/thread/model.go(thread pane has its own copy of the pill loop).Tested on ghostty (macOS, slk 0.13.1) — reaction counts render green again with
emoji_images = "on".