diff options
author | 2011-12-13 16:06:00 +0900 | |
---|---|---|
committer | 2011-12-13 16:06:00 +0900 | |
commit | 2939063947982b77a942a5ee9882944b8b48dd69 (patch) | |
tree | 95e4af7bde0eb98bae3ba9683890938c51323a5b | |
parent | d2c69c7d1231c238afc9196dcb9cc2359de520cf (diff) | |
download | latinime-2939063947982b77a942a5ee9882944b8b48dd69.tar.gz latinime-2939063947982b77a942a5ee9882944b8b48dd69.tar.xz latinime-2939063947982b77a942a5ee9882944b8b48dd69.zip |
Simplification
Both tests have the same meaning. They should be merged.
Also, if "deleteLast()" deletes more than one char (which
never happens in the current implementation, but it's not
guaranteed), the new code is more correct.
Change-Id: I216df7cd45f4a7d76d1d5d6aa7f8d7f9a6e35ea3
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index f5875ca4a..6f7bdd85f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1423,10 +1423,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar ic.setComposingText(textWithUnderline, 1); if (mWordComposer.size() == 0) { mHasUncommittedTypedChars = false; - } - if (1 == length) { - // 1 == length means we are about to erase the last character of the word, - // so we can show bigrams. + // Remaining size equals zero means we just erased the last character of the + // word, so we can show bigrams. mHandler.postUpdateBigramPredictions(); } else { // length > 1, so we still have letters to deduce a suggestion from. |