From 7eea6f94ed753dd358fb53dac889fc40455810e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 5 Dec 2020 11:43:54 +0100 Subject: [PATCH] =?UTF-8?q?ime:=20don=E2=80=99t=20commit=20to=20the=20slav?= =?UTF-8?q?e=20while=20scrollback=20searching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ime.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ime.c b/ime.c index a60e72f5..17db0b1a 100644 --- a/ime.c +++ b/ime.c @@ -129,10 +129,14 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, /* 3. Insert commit string */ if (seat->ime.commit.pending.text != NULL) { - term_to_slave( - term, - seat->ime.commit.pending.text, - strlen(seat->ime.commit.pending.text)); + if (term->is_searching) { + /* TODO */ + } else { + term_to_slave( + term, + seat->ime.commit.pending.text, + strlen(seat->ime.commit.pending.text)); + } ime_reset_commit(seat); } @@ -214,7 +218,7 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, * * I haven't found an IME that requests anything else */ - + const size_t byte_len = strlen(seat->ime.preedit.pending.text); int cell_begin = -1, cell_end = -1;