Merge "Early exit if the target region is empty" into sc-v2-dev

This commit is contained in:
Seigo Nonaka
2021-10-05 03:02:01 +00:00
committed by Android (Google) Code Review

View File

@@ -782,7 +782,7 @@ public class TextLine {
int spanStart = runStart;
int spanLimit;
if (mSpanned == null) {
if (mSpanned == null || runStart == runLimit) {
spanLimit = runLimit;
} else {
int target = after ? offset + 1 : offset;