aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 980215de6..6226f9b21 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -338,7 +338,6 @@ public final class RichInputConnection {
public void setComposingRegion(final int start, final int end) {
if (DEBUG_BATCH_NESTING) checkBatchEdit();
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
- mCurrentCursorPosition = end;
final CharSequence textBeforeCursor =
getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE + (end - start), 0);
mCommittedTextBeforeComposingText.setLength(0);
@@ -723,6 +722,14 @@ public final class RichInputConnection {
}
/**
+ * The user moved the cursor by hand. Take a note of it.
+ * @param newCursorPosition The new cursor position.
+ */
+ public void userMovedCursor(final int newCursorPosition) {
+ mCurrentCursorPosition = newCursorPosition;
+ }
+
+ /**
* Looks at the text just before the cursor to find out if it looks like a URL.
*
* The weakest point here is, if we don't have enough text bufferized, we may fail to realize