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

Commit 95753e2f authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Ensure to reset state of selecting by word/char for new selections" into mnc-dev

parents 60eb693b 36d5a7b2
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -4071,11 +4071,16 @@ public class Editor {
                    offset = getNextCursorOffset(selectionEnd, false);
                    mTouchWordDelta = 0.0f;
                }
                mInWord = !getWordIteratorWithText().isBoundary(offset);
                positionAtCursorOffset(offset, false);
            }
        }

        @Override
        protected void positionAtCursorOffset(int offset, boolean parentScrolled) {
            super.positionAtCursorOffset(offset, parentScrolled);
            mInWord = !getWordIteratorWithText().isBoundary(offset);
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            boolean superResult = super.onTouchEvent(event);
@@ -4193,11 +4198,16 @@ public class Editor {
                    offset = getNextCursorOffset(selectionStart, true);
                    mTouchWordDelta = 0.0f;
                }
                mInWord = !getWordIteratorWithText().isBoundary(offset);
                positionAtCursorOffset(offset, false);
            }
        }

        @Override
        protected void positionAtCursorOffset(int offset, boolean parentScrolled) {
            super.positionAtCursorOffset(offset, parentScrolled);
            mInWord = !getWordIteratorWithText().isBoundary(offset);
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            boolean superResult = super.onTouchEvent(event);