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
main
Jean Chalard 2011-12-13 16:06:00 +09:00
parent d2c69c7d12
commit 2939063947
1 changed files with 2 additions and 4 deletions

View File

@ -1423,10 +1423,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
ic.setComposingText(textWithUnderline, 1); ic.setComposingText(textWithUnderline, 1);
if (mWordComposer.size() == 0) { if (mWordComposer.size() == 0) {
mHasUncommittedTypedChars = false; mHasUncommittedTypedChars = false;
} // Remaining size equals zero means we just erased the last character of the
if (1 == length) { // word, so we can show bigrams.
// 1 == length means we are about to erase the last character of the word,
// so we can show bigrams.
mHandler.postUpdateBigramPredictions(); mHandler.postUpdateBigramPredictions();
} else { } else {
// length > 1, so we still have letters to deduce a suggestion from. // length > 1, so we still have letters to deduce a suggestion from.