am e18fdf80: Merge "Fix a bug with surrogate pairs"

* commit 'e18fdf804acdc7cd8db19c2a03adecc44d71f1ef':
  Fix a bug with surrogate pairs
main
Jean Chalard 2013-08-14 00:31:02 -07:00 committed by Android Git Automerger
commit f6236e7e9e
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());
// 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());