]> git.eshelyaron.com Git - emacs.git/commitdiff
Clear batch edit state once a new input connection is established
authorPo Lu <luangruo@yahoo.com>
Mon, 5 Jun 2023 03:34:18 +0000 (11:34 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 5 Jun 2023 03:34:18 +0000 (11:34 +0800)
* src/androidterm.c (android_handle_ime_event): Clear batch edit
state, in case the previous input method forgot to do so.

src/androidterm.c

index afa10a1b94b72d96be66caf7efc7c4f8bf5d766f..2a054715d6a50f5febaf924c66c52befdcf9e302 100644 (file)
@@ -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: