diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-17 10:47:47 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-17 10:47:47 +0000 |
| commit | 93207bc48268465234dc1c55a5e3851f1d5b50b8 (patch) | |
| tree | 94a5130b91eaa9481fdefa1fffefad80f2684075 /render.c | |
| parent | term: ptmx: don't enqueue extra frame render when app sync updates have been changed (diff) | |
render: render non-block cursors after rendering the glyph + decorations
This fixes an issue where an 'underline' cursor wasn't visible on
underlined text - the cursor was rendered first, and then shadowed by
the text underline.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -432,14 +432,14 @@ render_cell(struct terminal *term, pixman_image_t *pix, PIXMAN_OP_SRC, pix, &bg, 1, &(pixman_rectangle16_t){x, y, cell_cols * width, height}); - if (has_cursor) - draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols); - if (cell->attrs.blink) term_arm_blink_timer(term); + if (has_cursor && term->cursor_style == CURSOR_BLOCK) + draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols); + if (cell->wc == 0 || cell->attrs.conceal) - return cell_cols; + goto draw_cursor; if (glyph != NULL) { if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) { @@ -472,6 +472,10 @@ render_cell(struct terminal *term, pixman_image_t *pix, &fg, x, y, cell_cols); } +draw_cursor: + if (has_cursor && term->cursor_style != CURSOR_BLOCK) + draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols); + return cell_cols; } |
