diff --git a/src/renderer/vaxis/Cell.zig b/src/renderer/vaxis/Cell.zig index b680eff..f32be7a 100644 --- a/src/renderer/vaxis/Cell.zig +++ b/src/renderer/vaxis/Cell.zig @@ -55,6 +55,10 @@ pub inline fn set_style_fg(self: *Cell, style_: Style) void { if (style_.fg) |fg| self.cell.style.fg = apply_alpha(self.cell.style.bg, fg); } +pub inline fn set_style_bg_opaque(self: *Cell, style_: Style) void { + if (style_.bg) |bg| self.cell.style.bg = vaxis.Cell.Color.rgbFromUint(bg.color); +} + pub inline fn set_style_bg(self: *Cell, style_: Style) void { if (style_.bg) |bg| self.cell.style.bg = apply_alpha(self.cell.style.bg, bg); } diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 070d5b8..148fa45 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -972,6 +972,7 @@ pub const Editor = struct { } inline fn render_selection_cell(_: *const Self, theme: *const Widget.Theme, cell: *Cell) void { + cell.set_style_bg_opaque(theme.editor); cell.set_style_bg(theme.editor_selection); }