diff options
author | 2011-12-15 22:56:17 -0800 | |
---|---|---|
committer | 2011-12-15 22:56:17 -0800 | |
commit | 71551c2bc4bba0f426a53e0b52b819d60bd1c35c (patch) | |
tree | e9c7de19732e04df65fccbad0c693695ab15db60 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 42a9a386dba8fa779205e567d2d9570b494369d4 (diff) | |
parent | be2f81f05539c064bdc1791d0dd60f3e68292ae1 (diff) | |
download | latinime-71551c2bc4bba0f426a53e0b52b819d60bd1c35c.tar.gz latinime-71551c2bc4bba0f426a53e0b52b819d60bd1c35c.tar.xz latinime-71551c2bc4bba0f426a53e0b52b819d60bd1c35c.zip |
am be2f81f0: Merge "Make the word composer aware of commits."
* commit 'be2f81f05539c064bdc1791d0dd60f3e68292ae1':
Make the word composer aware of commits.
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 a220bf42c..32eabdb5f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1149,6 +1149,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); @@ -2033,6 +2034,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } } mHasUncommittedTypedChars = false; + mWordComposer.onCommitWord(); } private static final WordComposer sEmptyWordComposer = new WordComposer(); @@ -2202,10 +2204,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(); @@ -2234,6 +2237,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(); |