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

Commit 5765561f authored by Mady Mellor's avatar Mady Mellor Committed by Android Git Automerger
Browse files

am a0993670: am 03709c78: Merge "Text selection: update touch delta when...

am a0993670: am 03709c78: Merge "Text selection: update touch delta when moving towards handles" into mnc-dev

* commit 'a0993670':
  Text selection: update touch delta when moving towards handles
parents 0f6dd549 a0993670
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -4157,6 +4157,11 @@ public class Editor {
                        offset = adjustedOffset;
                    }
                    positionCursor = true;
                } else if (adjustedOffset < mPreviousOffset) {
                    // Handle has jumped to the start of the word, and the user is moving
                    // their finger towards the handle, the delta should be updated.
                    mTouchWordDelta = mTextView.convertToLocalHorizontalCoordinate(x)
                            - layout.getPrimaryHorizontal(mPreviousOffset);
                }
            }

@@ -4291,6 +4296,11 @@ public class Editor {
                        offset = adjustedOffset;
                    }
                    positionCursor = true;
                } else if (adjustedOffset > mPreviousOffset) {
                    // Handle has jumped to the end of the word, and the user is moving
                    // their finger towards the handle, the delta should be updated.
                    mTouchWordDelta = layout.getPrimaryHorizontal(mPreviousOffset)
                            - mTextView.convertToLocalHorizontalCoordinate(x);
                }
            }