From 9b6d0cfcd1e45f1f2038878805ab87523c3180d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 17 Aug 2019 17:43:47 +0200 Subject: [PATCH] render: minor optimization Don't instantiate a pixman color unnecessarily when drawing a block cursor. --- render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.c b/render.c index 7285eac3..d69e238b 100644 --- a/render.c +++ b/render.c @@ -215,7 +215,7 @@ render_cell(struct terminal *term, pixman_image_t *pix, &(pixman_rectangle16_t){x, y, cell_cols * width, height}); /* Non-block cursors */ - if (has_cursor) { + if (has_cursor && !block_cursor) { pixman_color_t cursor_color = term->cursor_color.text >> 31 ? color_hex_to_pixman(term->cursor_color.cursor) : color_hex_to_pixman(_fg);