✨ per-side border support#96
Open
rauhryan wants to merge 1 commit into
Open
Conversation
expands per-side border attributes to allow for fg, width, bg properties for each side of the border
|
Size Increased — +0.8 KB 109.0 KB unpacked |
commit: |
Collaborator
Author
dreyfus92
reviewed
Jun 11, 2026
dreyfus92
left a comment
Member
There was a problem hiding this comment.
looks good overall just left a comment 👀
Comment on lines
+306
to
+316
| /* userData points at eight words in the command buffer carrying resolved | ||
| * per-side attributes as fg/bg pairs in top, right, bottom, left order. | ||
| * Fallback resolution (shared color/bg vs side overrides) happens on the | ||
| * TypeScript side; this renderer consumes explicit values only. The | ||
| * command buffer outlives the render pass within reduce(). */ | ||
| const uint32_t *s = (const uint32_t *)cmd->userData; | ||
| uint32_t deffg = color(b->color); | ||
| uint32_t top_fg = s ? s[0] : deffg, top_bg = s ? s[1] : ATTR_DEFAULT; | ||
| uint32_t right_fg = s ? s[2] : deffg, right_bg = s ? s[3] : ATTR_DEFAULT; | ||
| uint32_t bot_fg = s ? s[4] : deffg, bot_bg = s ? s[5] : ATTR_DEFAULT; | ||
| uint32_t left_fg = s ? s[6] : deffg, left_bg = s ? s[7] : ATTR_DEFAULT; |
Member
There was a problem hiding this comment.
so if i'm understanding this correctly, deffg can't resolve to the shared color anymore, reduce() no longer sets decl.border.color, so b->color is always {0} and this fallback yields explicit black, not the shared fg, since the s===NULL branch is only reachable on a truncated buffer that validate would reject anyway, maybe just a fall back after to ATTR_DEFAULT here like the bg pairs do? as written it reads like the shared color still exists on the C side but it only lives in the ts resolution now 👀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds per-side border support
Closes #
Type of change
Checklist
pnpm test)pnpm format)AI-generated code disclosure