From 83d3ae10aeea5ac7d451d789891542a1964c3faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 3 Dec 2020 18:39:34 +0100 Subject: [PATCH] =?UTF-8?q?render:=20ime:=20don=E2=80=99t=20render=20curso?= =?UTF-8?q?r=20if=20cursor=20begin=20=3D=3D=20end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- render.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/render.c b/render.c index 9546de46..34323801 100644 --- a/render.c +++ b/render.c @@ -1093,9 +1093,10 @@ render_ime_preedit(struct terminal *term, struct buffer *buf) } /* Hollow cursor */ - if (!term->ime.preedit.cursor.hidden) { - int start = term->ime.preedit.cursor.start; - int end = term->ime.preedit.cursor.end; + int start = term->ime.preedit.cursor.start; + int end = term->ime.preedit.cursor.end; + + if (!term->ime.preedit.cursor.hidden && end > start) { pixman_color_t fg = color_hex_to_pixman(term->colors.fg); pixman_color_t bg = color_hex_to_pixman(term->colors.bg);