diff --git a/src/tui.zig b/src/tui.zig index 1ea8339..cc65943 100644 --- a/src/tui.zig +++ b/src/tui.zig @@ -1539,9 +1539,23 @@ pub const App = struct { // wins. Spans are expected to be small (<= ~15 per // line for the review tab's column count), so a // linear scan per cell is fine. + // + // Span composition rule: spans describe a per-cell + // semantic intent (positive/negative/muted/etc.) — + // they own fg, bold, italic, underline. The row's + // base style owns bg (so a cursor-row's highlight + // bar reads as a continuous span across the whole + // row, not gappy where the colored cells land). + // `alt_*` (used by braille charts) keeps the + // legacy "replace fully" behavior since those + // overlays are decorative chart fills where the + // bg IS the signal. if (line.spans) |spans| { for (spans) |sp| { - if (col >= sp.start and col < sp.end) s = sp.style; + if (col >= sp.start and col < sp.end) { + s = sp.style; + s.bg = line.style.bg; + } } } else if (line.alt_style) |alt| { if (col >= line.alt_start and col < line.alt_end) s = alt;