fix(gui): handle reverse style bit

This commit is contained in:
CJ van den Berg 2026-04-10 22:03:09 +02:00
parent 4391d6d0f0
commit e299638f8b
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -145,8 +145,8 @@ pub fn updateScreen(
for (vx_screen.buf[0..cell_count], new_cells, new_codepoints, new_widths) |*vc, *gc, *cp, *wt| {
gc.* = .{
.glyph_index = 0,
.background = colorFromVaxis(vc.style.bg),
.foreground = colorFromVaxis(vc.style.fg),
.background = colorFromVaxis(if (vc.style.reverse) vc.style.fg else vc.style.bg),
.foreground = colorFromVaxis(if (vc.style.reverse) vc.style.bg else vc.style.fg),
};
// Decode first codepoint from the grapheme cluster.
const g = vc.char.grapheme;