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

Commit a74ae9c4 authored by Jean Chalard's avatar Jean Chalard
Browse files

Fix a bug with surrogate pairs

Bug: 10316781
Change-Id: I528c59c8823cda11975cb01b0ae59f12cfadef3b
parent 53830bf4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2555,8 +2555,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());