Update suggestions when user presses the backspace even when there is not two or more suggestions

Bug: 5384445
Change-Id: I419999da8f5745ac114d0173beeadcb365a8c3ac
This commit is contained in:
satok 2011-09-29 15:58:58 +09:00
parent 55072fefe6
commit 074cda4d26

View file

@ -1661,9 +1661,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion( builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion(
autoCorrectionAvailable); autoCorrectionAvailable);
} else { } else {
final SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions(); SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
if (previousSuggestions == mSettingsValues.mSuggestPuncList) if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
return; if (builder.size() == 0) {
return;
}
previousSuggestions = SuggestedWords.EMPTY;
}
builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions); builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
} }
} }