summaryrefslogtreecommitdiff
path: root/src/androidterm.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-06-09 18:05:26 +0800
committerPo Lu <luangruo@yahoo.com>2023-06-09 18:05:26 +0800
commit01bea42cbff84ca76f339088f19a42cddfe83cbb (patch)
treef3f0c250a13ee6e4ad004fbc310726667779710a /src/androidterm.c
parenta5b74e2ff62faccea19c00783e62bc328c30f92a (diff)
Avoid responding to input method queries asynchronously
* src/androidterm.c (handle_one_android_event): Don't answer queries here; just rely on the event interrupting android_select. This avoids exposing buffer contents to input methods while a command is being executed. * src/textconv.c (TEXTCONV_DEBUG, really_commit_text) (really_finish_composing_text, really_set_composing_text) (really_set_composing_region, really_delete_surrounding_text) (really_set_point_and_mark, get_extracted_text): Add debugging printouts.
Diffstat (limited to 'src/androidterm.c')
-rw-r--r--src/androidterm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index 77f2bd1c7a0..704ff5f5d85 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -1053,12 +1053,12 @@ handle_one_android_event (struct android_display_info *dpyinfo,
used to make Android run stuff. */
if (!event->xaction.window && !event->xaction.action)
- {
- /* Check for and run anything the UI thread wants to run on the main
- thread. */
- android_check_query ();
- goto OTHER;
- }
+ /* Don't run queries here, as it may run inside editor
+ commands, which can expose an inconsistent view of buffer
+ contents to the input method during command execution.
+
+ Instead, wait for Emacs to return to `android_select'. */
+ goto OTHER;
f = any;