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

Commit 77840f4e authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Fix cursor position calculation."

parents 80eaa6aa b89a605b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2120,9 +2120,9 @@ public class Paint {
        int contextLen = contextEnd - contextStart;
        char[] buf = TemporaryBuffer.obtain(contextLen);
        TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
        int result = getTextRunCursor(buf, 0, contextLen, dir, offset - contextStart, cursorOpt);
        int relPos = getTextRunCursor(buf, 0, contextLen, dir, offset - contextStart, cursorOpt);
        TemporaryBuffer.recycle(buf);
        return result;
        return (relPos == -1) ? -1 : relPos + contextStart;
    }

    /**