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

Commit e18fdf80 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug with surrogate pairs"

parents 90619ae0 a74ae9c4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2558,8 +2558,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
            }
        }
        mWordComposer.setComposingWord(typedWord, mKeyboardSwitcher.getKeyboard());
        // TODO: this is in chars but the callee expects code points!
        mWordComposer.setCursorPositionWithinWord(numberOfCharsInWordBeforeCursor);
        mWordComposer.setCursorPositionWithinWord(
                typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
        mConnection.setComposingRegion(
                mLastSelectionStart - numberOfCharsInWordBeforeCursor,
                mLastSelectionEnd + range.getNumberOfCharsInWordAfterCursor());