Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3582d26e authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Early exit if the target region is empty

Bug: 193849901
Test: atest StaticLayoutBidiTouchTest
Change-Id: I55f04068a6e5b353867d50742356c272d28886b3
parent e31184cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;