mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-17 22:05:22 -05:00
render: cursor: use default fg/bg if cell fg/bg are the same
When deciding which colors to use for the cursor, and the cursor text and background colors are the same, use the default fg/bg instead. Closes #1761
This commit is contained in:
parent
f066fe47f0
commit
c46c124363
2 changed files with 14 additions and 0 deletions
8
render.c
8
render.c
|
|
@ -573,6 +573,14 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell,
|
|||
*text_color = color_hex_to_pixman(term->colors.bg);
|
||||
}
|
||||
}
|
||||
|
||||
if (text_color->red == cursor_color->red &&
|
||||
text_color->green == cursor_color->green &&
|
||||
text_color->blue == cursor_color->blue)
|
||||
{
|
||||
*text_color = color_hex_to_pixman(term->colors.bg);
|
||||
*cursor_color = color_hex_to_pixman(term->colors.fg);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue