From 8a849b4b08539766e8251fa9e7d56c557878617b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 28 Feb 2023 17:49:57 +0100 Subject: [PATCH] render: fix inversed cursor fg color when alpha != 1.0, take #2 No need to check if terminal colors have been reversed - this is done by the cell rendering logic. This hopefully fixes all remaining issues with invisible text when background alpha < 1.0 --- render.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/render.c b/render.c index e85d669b..b1c56bbc 100644 --- a/render.c +++ b/render.c @@ -419,14 +419,13 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell, } } else { *cursor_color = *fg; + *text_color = *bg; if (unlikely(text_color->alpha != 0xffff)) { - /* We *know* this only happens when bg is the default bg - * color */ - *text_color = color_hex_to_pixman( - term->reverse ^ is_selected ? term->colors.fg : term->colors.bg); - } else - *text_color = *bg; + /* The *only* color that can have transparency is the + * default background color */ + *text_color = color_hex_to_pixman(term->colors.bg); + } } }