emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android c4a89851ed9: Clear batch edit state once a new input con


From: Po Lu
Subject: feature/android c4a89851ed9: Clear batch edit state once a new input connection is established
Date: Sun, 4 Jun 2023 23:34:41 -0400 (EDT)

branch: feature/android
commit c4a89851ed949e311d8b84eda413c4ba440485c4
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 src/androidterm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]