✨ Add border-cell backgrounds#94
Conversation
commit: |
|
Size Increased — +0.4 KB 108.2 KB unpacked |
| let beforeCorner = ansi.slice(0, corner); | ||
| expect(beforeCorner).toContain(bg.sgr); | ||
| }); | ||
|
|
There was a problem hiding this comment.
i'm here thinking if we should tighten this test a bit more, from what i'm reading this is asserting the bg SGR appears somewhere in the slice(0, corner), which can pass for the wrong reason, the SGR could've been emitted earlier in the stream for something unrelated. better to assert the SGR appears immediately preceding the ┌ and ideally check an edge and a second corner too, since the spec explicitly promises corners, horizontal & vertical edges. this is not a blocker btw just a future ref in case we hit a loose bug somewhere.
| Clay_BorderRenderData *b = &cmd->renderData.border; | ||
| uint32_t fg = color(b->color); | ||
| uint32_t bg = ATTR_DEFAULT; | ||
| uint32_t bg = (uint32_t)(uintptr_t)cmd->userData; |
There was a problem hiding this comment.
we should leave a comment on top of this, something like "userData is currently exclusively the border-bg word"
dreyfus92
left a comment
There was a problem hiding this comment.
lgtm, thank you ryan. woops there are some conflicts that still need some attention 😄
What does this PR do?
✨ Add border-cell backgrounds
Closes #68
Type of change
Checklist
pnpm test)pnpm format)AI-generated code disclosure