aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-24 05:28:58 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-24 05:28:58 -0700
commit8e73ea1aa5dcbd816a65a61a6f916e567b4e93ed (patch)
tree32d4be045e1db74f09d6ebba22af42ee6ae817ac /java/src/com/android/inputmethod/latin
parent750e3a4673b689d62d7f113041eb52647b08cc9d (diff)
parentcbed462d192d0c5af9614f5f997b2768f3d0eb56 (diff)
downloadlatinime-8e73ea1aa5dcbd816a65a61a6f916e567b4e93ed.tar.gz
latinime-8e73ea1aa5dcbd816a65a61a6f916e567b4e93ed.tar.xz
latinime-8e73ea1aa5dcbd816a65a61a6f916e567b4e93ed.zip
am cbed462d: [CB12] Reset the combining state when resetting the composer
* commit 'cbed462d192d0c5af9614f5f997b2768f3d0eb56': [CB12] Reset the combining state when resetting the composer
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index d55a773b4..78990e011 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -127,6 +127,7 @@ public final class WordComposer {
* Clear out the keys registered so far.
*/
public void reset() {
+ mCombinerChain.reset();
mTypedWord.setLength(0);
mEvents.clear();
mAutoCorrection = null;
@@ -246,6 +247,8 @@ public final class WordComposer {
* @return true if the cursor is still inside the composing word, false otherwise.
*/
public boolean moveCursorByAndReturnIfInsideComposingWord(final int expectedMoveAmount) {
+ // TODO: should uncommit the composing feedback
+ mCombinerChain.reset();
int actualMoveAmountWithinWord = 0;
int cursorPos = mCursorPositionWithinWord;
final int[] codePoints;
@@ -485,6 +488,7 @@ public final class WordComposer {
mIsBatchMode = false;
mPreviousWordForSuggestion = committedWord.toString();
mTypedWord.setLength(0);
+ mCombinerChain.reset();
mEvents.clear();
mCodePointSize = 0;
mTrailingSingleQuotesCount = 0;
@@ -512,6 +516,7 @@ public final class WordComposer {
Collections.copy(mEvents, lastComposedWord.mEvents);
mInputPointers.set(lastComposedWord.mInputPointers);
mTypedWord.setLength(0);
+ mCombinerChain.reset();
mTypedWord.append(lastComposedWord.mTypedWord);
refreshSize();
mCapitalizedMode = lastComposedWord.mCapitalizedMode;