mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: fallback to background color if cursor text color is not set
This commit is contained in:
parent
5d702e6fbf
commit
2c8b31204f
1 changed files with 3 additions and 3 deletions
6
render.c
6
render.c
|
|
@ -323,10 +323,10 @@ draw_cursor(const struct terminal *term, const struct cell *cell,
|
|||
bool is_selected = cell->attrs.selected;
|
||||
|
||||
if (term->cursor_color.cursor >> 31) {
|
||||
assert(term->cursor_color.text);
|
||||
|
||||
cursor_color = color_hex_to_pixman(term->cursor_color.cursor);
|
||||
text_color = color_hex_to_pixman(term->cursor_color.text);
|
||||
text_color = color_hex_to_pixman(
|
||||
term->cursor_color.text >> 31
|
||||
? term->cursor_color.text : term->colors.bg);
|
||||
|
||||
if (term->reverse ^ cell->attrs.reverse ^ is_selected) {
|
||||
pixman_color_t swap = cursor_color;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue