diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index b197c5bea..86d786511 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -156,6 +156,11 @@ public class AndroidSpellCheckerService extends SpellCheckerService { // } return true; } + if (insertIndex >= mMaxLength) { + // We found a suggestion, but its score is too weak to be kept considering + // the suggestion limit. + return true; + } // Compute the normalized score and skip this word if it's normalized score does not // make the threshold.