diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-12 18:00:28 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-12 18:00:28 +0000 |
| commit | c6640adde342ee2c7e0ce4b4adc5de8417925a96 (patch) | |
| tree | 2f58d3fb86a21cc54828f765550c8e4bfe6ab3f3 | |
| parent | doc: add foot.5 (configuration) (diff) | |
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.
| -rw-r--r-- | render.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |
