diff options
author | satok <satok@google.com> | 2012-03-08 02:31:08 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-08 02:31:08 -0800 |
commit | 3154fc45e5294619c6f17c6e325036fbe8c70c5f (patch) | |
tree | 43c5c0b9362aea50713a56f85681082a62db287c /core/java/android/widget | |
parent | 792ee0cc4d9415e45a16803c6fe3e60c53760e25 (diff) | |
parent | 2428ccbbde3ca1f6643a4952a6ca881dab80ce45 (diff) | |
download | frameworks_base-3154fc45e5294619c6f17c6e325036fbe8c70c5f.zip frameworks_base-3154fc45e5294619c6f17c6e325036fbe8c70c5f.tar.gz frameworks_base-3154fc45e5294619c6f17c6e325036fbe8c70c5f.tar.bz2 |
Merge "Fix spell checker framework"
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/SpellChecker.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/SpellChecker.java b/core/java/android/widget/SpellChecker.java index a24faab..4f700a2 100644 --- a/core/java/android/widget/SpellChecker.java +++ b/core/java/android/widget/SpellChecker.java @@ -497,8 +497,8 @@ public class SpellChecker implements SpellCheckerSessionListener { wordStart = regionEnd; // TODO: Find the start position of the sentence. // Set span with the context - final int spellCheckStart = Math.min( - start, Math.max(wordStart, regionEnd - WORD_ITERATOR_INTERVAL)); + final int spellCheckStart = Math.max( + 0, Math.min(wordStart, regionEnd - WORD_ITERATOR_INTERVAL)); if (regionEnd <= spellCheckStart) { return; } |