From 074cda4d266b5d034d4348961c9183e32b16af5a Mon Sep 17 00:00:00 2001 From: satok Date: Thu, 29 Sep 2011 15:58:58 +0900 Subject: [PATCH] Update suggestions when user presses the backspace even when there is not two or more suggestions Bug: 5384445 Change-Id: I419999da8f5745ac114d0173beeadcb365a8c3ac --- java/src/com/android/inputmethod/latin/LatinIME.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 48a1f8bd7..cf1cb8f25 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1661,9 +1661,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion( autoCorrectionAvailable); } else { - final SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions(); - if (previousSuggestions == mSettingsValues.mSuggestPuncList) - return; + SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions(); + if (previousSuggestions == mSettingsValues.mSuggestPuncList) { + if (builder.size() == 0) { + return; + } + previousSuggestions = SuggestedWords.EMPTY; + } builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions); } }