static void
android_handle_ime_event (union android_event *event, struct frame *f)
{
- Lisp_Object text;
+ Lisp_Object text UNINIT;
/* First, decode the text if necessary. */
event.ime.position = start;
event.ime.text = NULL;
event.ime.counter = ++edit_counter;
+
+ android_write_event (&event);
}
/* Structure describing the context for `getSelection'. */
Fpoint (), Qnil);
Fset_marker_insertion_type (f->conversion.compose_region_end,
Qt);
+
+ start = position;
}
else
{
/* Test if F has any outstanding conversion events. Then
process them in bottom to up order. */
- for (action = f->conversion.actions; action; action = next)
+ while (true)
{
/* Redisplay in between if there is more than one
- action. */
+ action.
+
+ This can read input. This function must be reentrant
+ here. */
if (handled)
redisplay ();
+ /* Reload action. */
+ action = f->conversion.actions;
+
+ /* If there are no more actions, break. */
+
+ if (!action)
+ break;
+
/* Unlink this action. */
next = action->next;
f->conversion.actions = next;
/* Detect overflow. */
- if (!(start <= PT <= end))
+ if (!(start <= PT && PT <= end))
goto finish;
/* Convert the character positions to byte positions. */