From 8f37c839f31abde6c555d623acb11c23e7b35e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 2 Jun 2020 18:22:55 +0200 Subject: [PATCH] render: draw hollow block cursor on top of the character, not the opposite --- CHANGELOG.md | 2 +- render.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb69307b..c5113e95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ * Set `IUTF8`. * Selection of double-width characters. It is no longer possible to select half of a double-width character. - +* Draw hollow block cursor on top of character. ### Security diff --git a/render.c b/render.c index 46bb459c..96233c52 100644 --- a/render.c +++ b/render.c @@ -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;