Merge "Prevent SpellChecker from setting invalid range"
This commit is contained in:
@@ -731,10 +731,14 @@ public class SpellChecker implements SpellCheckerSessionListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scheduleOtherSpellCheck) {
|
if (scheduleOtherSpellCheck && wordStart <= end) {
|
||||||
// Update range span: start new spell check from last wordStart
|
// Update range span: start new spell check from last wordStart
|
||||||
setRangeSpan(editable, wordStart, end);
|
setRangeSpan(editable, wordStart, end);
|
||||||
} else {
|
} else {
|
||||||
|
if (DBG && scheduleOtherSpellCheck) {
|
||||||
|
Log.w(TAG, "Trying to schedule spellcheck for invalid region, from "
|
||||||
|
+ wordStart + " to " + end);
|
||||||
|
}
|
||||||
removeRangeSpan(editable);
|
removeRangeSpan(editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user