diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-20 17:36:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-20 17:36:44 +0000 |
| commit | 2c8b31204ff66ae91aab34efdfae8f6bbc12ecc8 (patch) | |
| tree | 5deae23595376b6e787f8991827ee49fbd57919f | |
| parent | osc: implement OSC 12 and OSC 112 (set/reset text cursor color) (diff) | |
render: fallback to background color if cursor text color is not set
| -rw-r--r-- | render.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |
