From 7a43737745e5e6d8c5ef1cb29ade75b6ca2d6f03 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 27 Feb 2023 17:51:29 +0100 Subject: render: fix selected cursor cell being ‘invisble’ when background alpha is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... by taking the cell ‘selected’ state into account when determining whether to use the default fg or bg as the ‘text’ color. --- render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'render.c') diff --git a/render.c b/render.c index 1c9dcb16..e85d669b 100644 --- a/render.c +++ b/render.c @@ -424,7 +424,7 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell, /* We *know* this only happens when bg is the default bg * color */ *text_color = color_hex_to_pixman( - term->reverse ? term->colors.fg : term->colors.bg); + term->reverse ^ is_selected ? term->colors.fg : term->colors.bg); } else *text_color = *bg; } -- cgit v1.3