fix: don't alpha blend selections over matches
This commit is contained in:
parent
1545eb988d
commit
cbcf8cc2dd
2 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue