diff options
author | Po Lu <luangruo@yahoo.com> | 2023-06-05 11:34:18 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-06-05 11:34:18 +0800 |
commit | c4a89851ed949e311d8b84eda413c4ba440485c4 (patch) | |
tree | d1bb4c48979696d03f7066739d1d76b2374cc966 /src/androidterm.c | |
parent | 66783af554176c68cb58726aeff4ae6a23224234 (diff) | |
download | emacs-c4a89851ed949e311d8b84eda413c4ba440485c4.tar.gz |
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.
Diffstat (limited to 'src/androidterm.c')
-rw-r--r-- | src/androidterm.c | 10 |
1 files changed, 10 insertions, 0 deletions
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: |