Commit d03764b
committed
fix(color): degrade empty parent stack to transparent, chain fillers
Two follow-ups to 76ac76d/cdb4bfe8, found by an independent review:
- keywords.go's Resolve gated parent-keyword resolution on parents !=
nil, not len(parents) != 0. terminal.String() (cdb4bfe) leaves
ParentColors non-nil-but-empty after the very first block a process
ever renders, so every parentBackground/parentForeground resolved
against an empty stack after that point returned the literal keyword
string instead of Transparent - which then fails color parsing and
renders as no color at all, not even transparent.
- Engine.blockTailColors (76ac76d) captured a single *color.Set
re-derived from the tail segment's own Resolve*() calls. A segment's
stored color can itself be an unresolved parentBackground keyword
(normal - full resolution happens later against the live stack), so
a one-entry reseed had nowhere further to walk. Capture a full copy
of terminal.ParentColors instead of re-deriving one entry, so a
filler chains through an unresolved tail exactly like the block's
own last segment did.
Entire-Checkpoint: 6582863c12cb1 parent 76ac76d commit d03764b
2 files changed
Lines changed: 19 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
199 | | - | |
| 204 | + | |
200 | 205 | | |
201 | | - | |
202 | | - | |
| 206 | + | |
| 207 | + | |
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
| |||
518 | 523 | | |
519 | 524 | | |
520 | 525 | | |
521 | | - | |
522 | | - | |
523 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
524 | 529 | | |
525 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
526 | 534 | | |
527 | 535 | | |
528 | 536 | | |
529 | 537 | | |
530 | 538 | | |
531 | 539 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
| 540 | + | |
536 | 541 | | |
537 | 542 | | |
538 | 543 | | |
| |||
0 commit comments