mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: fix foreground color for non-block cursor
When rendering either the 'bar' or 'underline' cursor styles, only use the configured "cursor color" if it has actually been configured. If it hasn't, use the current foreground color.
This commit is contained in:
parent
9855d18ba7
commit
c6640adde3
1 changed files with 4 additions and 1 deletions
5
render.c
5
render.c
|
|
@ -195,7 +195,10 @@ render_cell(struct terminal *term, cairo_t *cr,
|
|||
|
||||
/* Non-block cursors */
|
||||
if (has_cursor) {
|
||||
struct rgb cursor_color = color_hex_to_rgb(term->cursor_color.cursor);
|
||||
struct rgb cursor_color = term->cursor_color.text >> 31
|
||||
? color_hex_to_rgb(term->cursor_color.cursor)
|
||||
: fg;
|
||||
|
||||
if (term->cursor_style == CURSOR_BAR)
|
||||
draw_bar(term, cr, cursor_color, x, y);
|
||||
else if (term->cursor_style == CURSOR_UNDERLINE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue