diff options
author | 2013-06-24 22:01:55 -0700 | |
---|---|---|
committer | 2013-06-24 22:01:55 -0700 | |
commit | cdb9fbfef75ad0dcbb34347cd4c3d866d96b36e9 (patch) | |
tree | 945bd0a14226c9f98a998ee4763c6306d31d7074 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | d57a26b2a10d2c42e091cca405580c15ae1148ed (diff) | |
parent | 10585620bdfad418f6c093ab4bfd8efaa2d84abf (diff) | |
download | latinime-cdb9fbfef75ad0dcbb34347cd4c3d866d96b36e9.tar.gz latinime-cdb9fbfef75ad0dcbb34347cd4c3d866d96b36e9.tar.xz latinime-cdb9fbfef75ad0dcbb34347cd4c3d866d96b36e9.zip |
am 10585620: Merge "Fix a bug in the cached cursor pos, and simplify selection handling"
* commit '10585620bdfad418f6c093ab4bfd8efaa2d84abf':
Fix a bug in the cached cursor pos, and simplify selection handling
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 9 |
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 d431ad60b..dc3aaaa9b 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -340,7 +340,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); @@ -731,6 +730,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 |