From 2c8b31204ff66ae91aab34efdfae8f6bbc12ecc8 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 20 Jan 2020 18:36:44 +0100 Subject: render: fallback to background color if cursor text color is not set --- render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'render.c') diff --git a/render.c b/render.c index 39a9f58c..e601d2ef 100644 --- a/render.c +++ b/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; -- cgit v1.3