render: draw hollow block cursor on top of the character, not the opposite

This commit is contained in:
Daniel Eklöf 2020-06-02 18:22:55 +02:00
parent 056fd4ffe0
commit 8f37c839f3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 3 additions and 3 deletions

View file

@ -428,7 +428,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
if (cell->attrs.blink)
term_arm_blink_timer(term);
if (has_cursor && term->cursor_style == CURSOR_BLOCK)
if (has_cursor && term->cursor_style == CURSOR_BLOCK && term->visual_focus)
draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols);
if (cell->wc == 0 || cell->attrs.conceal)
@ -487,7 +487,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
}
draw_cursor:
if (has_cursor && term->cursor_style != CURSOR_BLOCK)
if (has_cursor && (term->cursor_style != CURSOR_BLOCK || !term->visual_focus))
draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols);
return cell_cols;