Update Android port
* java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection, beginBatchEdit, reset, endBatchEdit): Keep track of the number of batch edits and return an appropriate value. (takeSnapshot): Implement function. * java/org/gnu/emacs/EmacsNative.java (takeSnapshot): New function. * java/org/gnu/emacs/EmacsService.java (resetIC): Improve debugging output. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Call `reset' to clear the UI side batch edit count. * src/androidterm.c (struct android_get_surrounding_text_context): New fields `conversion_start' and `conversion_end'. (android_get_surrounding_text): Return the conversion region. (android_get_surrounding_text_internal, NATIVE_NAME): Factor out `getSurroundingText'. (takeSnapshot): New function.
This commit is contained in:
@@ -681,6 +681,9 @@ public final class EmacsView extends ViewGroup
|
||||
|
||||
if (inputConnection == null)
|
||||
inputConnection = new EmacsInputConnection (this);
|
||||
else
|
||||
/* Clear several pieces of state in the input connection. */
|
||||
inputConnection.reset ();
|
||||
|
||||
/* Return the input connection. */
|
||||
return inputConnection;
|
||||
|
||||
Reference in New Issue
Block a user