diff options
author | 2011-12-13 23:12:22 +0900 | |
---|---|---|
committer | 2011-12-16 15:41:10 +0900 | |
commit | c73c26790fa9dcd836a918774d6efa39a05c0152 (patch) | |
tree | 6c232f802815a11bb83567068d21492cea021f4b /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | e9a0efc242f3bca80e8f64523a7bade659c28069 (diff) | |
download | latinime-c73c26790fa9dcd836a918774d6efa39a05c0152.tar.gz latinime-c73c26790fa9dcd836a918774d6efa39a05c0152.tar.xz latinime-c73c26790fa9dcd836a918774d6efa39a05c0152.zip |
Make the word composer aware of commits.
Change-Id: I04e691fbc9227d4df195429bca89edea93575347
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 20c87ad13..20e49fbca 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1148,6 +1148,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (!mHasUncommittedTypedChars) return; mHasUncommittedTypedChars = false; final CharSequence typedWord = mWordComposer.getTypedWord(); + mWordComposer.onCommitWord(); if (typedWord.length() > 0) { if (ic != null) { ic.commitText(typedWord, 1); @@ -2032,6 +2033,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } } mHasUncommittedTypedChars = false; + mWordComposer.onCommitWord(); } private static final WordComposer sEmptyWordComposer = new WordComposer(); @@ -2201,10 +2203,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } } ic.deleteSurroundingText(cancelLength + 1, 0); - - // Re-insert the separator + mWordComposer.resumeSuggestionOnKeptWord(); ic.commitText(mWordComposer.getTypedWord(), 1); + // Re-insert the separator ic.commitText(separator, 1); + mWordComposer.onCommitWord(); Utils.Stats.onSeparator(separator.charAt(0), WordComposer.NOT_A_COORDINATE, WordComposer.NOT_A_COORDINATE); mHandler.cancelUpdateBigramPredictions(); @@ -2233,6 +2236,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // restartSuggestionsOnWordBeforeCursorIfAtEndOfWord instead, but retrieving // the old WordComposer allows to reuse the actual typed coordinates. mHasUncommittedTypedChars = true; + mWordComposer.resumeSuggestionOnKeptWord(); ic.setComposingText(mWordComposer.getTypedWord(), 1); mHandler.cancelUpdateBigramPredictions(); mHandler.postUpdateSuggestions(); |