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

Commit 172b4510 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensures the slop value is fixed cross lines."

parents 54f5e733 38dfd196
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -6053,9 +6053,8 @@ public class Editor {
            return trueLine;
        }

        final int lineHeight = layout.getLineBottom(prevLine) - layout.getLineTop(prevLine);
        int slop = (int)(mLineSlopRatio
                * (layout.getLineBottom(trueLine) - layout.getLineTop(trueLine)));
        final int lineHeight = mTextView.getLineHeight();
        int slop = (int)(mLineSlopRatio * lineHeight);
        slop = Math.max(mLineChangeSlopMin,
                Math.min(mLineChangeSlopMax, lineHeight + slop)) - lineHeight;
        slop = Math.max(0, slop);