Merge "Fix a bug with surrogate pairs"

main
Jean Chalard 2013-08-14 07:27:54 +00:00 committed by Android (Google) Code Review
commit e18fdf804a
1 changed files with 2 additions and 2 deletions

View File

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