Skip to content

Commit a4fb0cb

Browse files
satok16Android (Google) Code Review
authored andcommitted
Merge "Optimization of the request of the sentence level spell check"
2 parents ffb66ec + fe5a51e commit a4fb0cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/java/android/widget/SpellChecker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ public void parse() {
494494
editable.removeSpan(mRange);
495495
return;
496496
}
497+
// Stop spell checking when there are no characters in the range.
498+
if (wordEnd < start) {
499+
return;
500+
}
497501
wordStart = regionEnd;
498502
// TODO: Find the start position of the sentence.
499503
// Set span with the context

0 commit comments

Comments
 (0)