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

Commit 4f831caa authored by Roozbeh Pournader's avatar Roozbeh Pournader Committed by Android (Google) Code Review
Browse files

Merge "Fix negative touch word offset that caused crashing when selecting text"

parents 55cff0b4 27d6b97f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3877,7 +3877,7 @@ public class Editor {
                    }
                }
                mPrevOffset = offset;
                mTouchWordOffset = trueOffset - offset;
                mTouchWordOffset = Math.max(trueOffset - offset, 0);
                mInWord = !isStartBoundary(offset);
                positionCursor = true;
            } else if (offset - mTouchWordOffset > mPrevOffset) {
@@ -3981,7 +3981,7 @@ public class Editor {
                    }
                }
                mPrevOffset = offset;
                mTouchWordOffset = offset - trueOffset;
                mTouchWordOffset = Math.max(offset - trueOffset, 0);
                mInWord = !isEndBoundary(offset);
                positionCursor = true;
            } else if (offset + mTouchWordOffset < mPrevOffset) {