aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-02 16:22:55 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-02 16:22:55 +0000
commit8f37c839f31abde6c555d623acb11c23e7b35e4f (patch)
tree1ce5429c5e8896e552c1a304973e69016172bd73 /render.c
parentselection: don't allow only half of double-width characters to be selected (diff)
render: draw hollow block cursor on top of the character, not the opposite
Diffstat (limited to 'render.c')
-rw-r--r--render.c4
1 files changed, 2 insertions, 2 deletions
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;