From: Po Lu Date: Mon, 5 Jun 2023 03:34:18 +0000 (+0800) Subject: Clear batch edit state once a new input connection is established X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c4a89851ed949e311d8b84eda413c4ba440485c4;p=emacs.git Clear batch edit state once a new input connection is established * src/androidterm.c (android_handle_ime_event): Clear batch edit state, in case the previous input method forgot to do so. --- diff --git a/src/androidterm.c b/src/androidterm.c index afa10a1b94b..2a054715d6a 100644 --- a/src/androidterm.c +++ b/src/androidterm.c @@ -725,6 +725,16 @@ android_handle_ime_event (union android_event *event, struct frame *f) finish_composing_text (f, event->ime.counter, event->ime.length == 1); + + if (event->ime.length == 2) + { + /* Now cancel outstanding batch edits if a new input method + has connected. */ + + f->conversion.batch_edit_flags = 0; + f->conversion.batch_edit_count = 0; + } + break; case ANDROID_IME_SET_COMPOSING_TEXT: