From 9ce0edc8bbcbdc5d269bdf573e20d959878ffa85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 5 Dec 2020 11:42:21 +0100 Subject: [PATCH] =?UTF-8?q?render:=20ime:=20don=E2=80=99t=20render=20pre-e?= =?UTF-8?q?dit=20string=20in=20grid=20while=20searching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While doing a scrollback search, the pre-edit string should be rendered in the search box, not in the grid. Note that we don’t yet support IME in scrollback search mode. This patch simply prevents the pre-edit text being rendered in the grid, in the “background”, while searching. --- render.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/render.c b/render.c index 2a3ab5b8..24e4c6c4 100644 --- a/render.c +++ b/render.c @@ -1029,6 +1029,9 @@ render_ime_preedit(struct terminal *term, struct buffer *buf) if (likely(term->ime.preedit.cells == NULL)) return; + if (unlikely(term->is_searching)) + return; + /* Adjust cursor position to viewport */ struct coord cursor; cursor = term->grid->cursor.point;