Fix selection_forground=none not being respected
This commit is contained in:
parent
2da25d9187
commit
2d66e37dcb
@ -187,12 +187,10 @@ void main() {
|
||||
effective_text_alpha = inactive_text_alpha * mix(1.0, dim_opacity, has_dim);
|
||||
float in_url = float((is_selected & TWO) >> 1);
|
||||
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 = choose_color(use_cell_for_selection_fg, bg, 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
|
||||
// Underline and strike through (rendered via sprites)
|
||||
underline_pos = choose_color(in_url, to_sprite_pos(pos, url_style, ZERO, ZERO), to_sprite_pos(pos, (text_attrs >> DECORATION_SHIFT) & THREE, ZERO, ZERO));
|
||||
strike_pos = to_sprite_pos(pos, ((text_attrs >> STRIKE_SHIFT) & ONE) * FOUR, ZERO, ZERO);
|
||||
|
||||
@ -165,7 +165,6 @@ def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = ())
|
||||
set_custom_ibeam_cursor()
|
||||
if not is_wayland() and not is_macos: # no window icons on wayland
|
||||
set_x11_window_icon()
|
||||
load_shader_programs.use_selection_fg = opts.selection_foreground is not None
|
||||
with cached_values_for(run_app.cached_values_name) as cached_values:
|
||||
with startup_notification_handler(extra_callback=run_app.first_window_callback) as pre_show_callback:
|
||||
window_id = create_os_window(
|
||||
|
||||
@ -207,8 +207,6 @@ def as_text(
|
||||
|
||||
class LoadShaderPrograms:
|
||||
|
||||
use_selection_fg = True
|
||||
|
||||
def __call__(self, semi_transparent: bool = False) -> None:
|
||||
compile_program(BLIT_PROGRAM, *load_shaders('blit'))
|
||||
v, f = load_shaders('cell')
|
||||
@ -232,9 +230,6 @@ class LoadShaderPrograms:
|
||||
if semi_transparent:
|
||||
vv = vv.replace('#define NOT_TRANSPARENT', '#define TRANSPARENT')
|
||||
ff = ff.replace('#define NOT_TRANSPARENT', '#define TRANSPARENT')
|
||||
if not load_shader_programs.use_selection_fg:
|
||||
vv = vv.replace('#define USE_SELECTION_FG', '#define DONT_USE_SELECTION_FG')
|
||||
ff = ff.replace('#define USE_SELECTION_FG', '#define DONT_USE_SELECTION_FG')
|
||||
compile_program(p, vv, ff)
|
||||
|
||||
v, f = load_shaders('graphics')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user