diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-02-28 16:49:57 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-02-28 16:49:57 +0000 |
| commit | 8a849b4b08539766e8251fa9e7d56c557878617b (patch) | |
| tree | 0f507b538011c0d2e2ed0d90996bd25a8f94ef29 | |
| parent | render: fix selected cursor cell being ‘invisble’ when background alpha is used (diff) | |
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
| -rw-r--r-- | render.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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); + } } } |
