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

Commit 38401272 authored by Victoria Lease's avatar Victoria Lease
Browse files

Revert "Fix a race condition."

This reverts commit 42e83c7f.

Bug: 12434783
Change-Id: Id01b6d14906430b13e64f5fc4d7fb01572d0a960
parent 42e83c7f
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -1113,11 +1113,8 @@ public final class InputLogic {
                keyboardSwitcher.getKeyboard());
        mWordComposer.setCursorPositionWithinWord(
                typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
        // TODO: Change these two lines to setComposingRegion(cursorPosition,
        //         cursorPosition + range.getNumberOfCharsInWordAfterCursor());
        mConnection.deleteSurroundingText(numberOfCharsInWordBeforeCursor,
              typedWord.length() - numberOfCharsInWordBeforeCursor);
        mConnection.setComposingText(typedWord, 1);
        mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor,
                expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor());
        if (suggestions.isEmpty()) {
            // We come here if there weren't any suggestion spans on this word. We will try to
            // compute suggestions for it instead.