Fix nulling selection_fg not working

This commit is contained in:
Kovid Goyal
2021-10-28 14:38:35 +05:30
parent 0c1a7347db
commit 28386cc496
2 changed files with 7 additions and 4 deletions

View File

@@ -12,7 +12,7 @@
// Inputs {{{
layout(std140) uniform CellRenderData {
float xstart, ystart, dx, dy, sprite_dx, sprite_dy, background_opacity;
float xstart, ystart, dx, dy, sprite_dx, sprite_dy, background_opacity, use_fg_for_selection;
uint default_fg, default_bg, highlight_fg, highlight_bg, cursor_fg, cursor_bg, url_color, url_style, inverted;
@@ -189,7 +189,7 @@ void main() {
decoration_fg = choose_color(in_url, color_to_vec(url_color), to_color(colors[2], fg_as_uint));
#ifdef USE_SELECTION_FG
// Selection
vec3 selection_color = color_to_vec(highlight_fg);
vec3 selection_color = choose_color(use_fg_for_selection, foreground, color_to_vec(highlight_fg));
foreground = choose_color(float(is_selected & ONE), selection_color, foreground);
decoration_fg = choose_color(float(is_selected & ONE), selection_color, decoration_fg);
#endif