diff options
author | 2014-01-20 02:46:43 -0800 | |
---|---|---|
committer | 2014-01-20 02:46:43 -0800 | |
commit | 528bddec97a293228ce5336b1d75ecbe8dd3b318 (patch) | |
tree | 6169c331da11a8f5952b52ee38a34d75833c2a61 /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | |
parent | 1905a54b9acc89cdb84d12f024c0b345f927ddec (diff) | |
parent | c93cf1c398fbea8bde4b568dae1fbe2f8d9b4180 (diff) | |
download | latinime-528bddec97a293228ce5336b1d75ecbe8dd3b318.tar.gz latinime-528bddec97a293228ce5336b1d75ecbe8dd3b318.tar.xz latinime-528bddec97a293228ce5336b1d75ecbe8dd3b318.zip |
am c93cf1c3: Use sorted int[] to represent word separators
* commit 'c93cf1c398fbea8bde4b568dae1fbe2f8d9b4180':
Use sorted int[] to represent word separators
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index d290daa7f..375a42e3b 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -970,7 +970,8 @@ public final class InputLogic { if (TextUtils.isEmpty(selectedText)) return; // Race condition with the input connection mRecapitalizeStatus.initialize(mConnection.getExpectedSelectionStart(), mConnection.getExpectedSelectionEnd(), selectedText.toString(), - settingsValues.mLocale, settingsValues.mSpacingAndPunctuations.mWordSeparators); + settingsValues.mLocale, + settingsValues.mSpacingAndPunctuations.mSortedWordSeparators); // We trim leading and trailing whitespace. mRecapitalizeStatus.trim(); } @@ -1073,7 +1074,7 @@ public final class InputLogic { final int expectedCursorPosition = mConnection.getExpectedSelectionStart(); if (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)) return; final TextRange range = mConnection.getWordRangeAtCursor( - settingsValues.mSpacingAndPunctuations.mWordSeparators, + settingsValues.mSpacingAndPunctuations.mSortedWordSeparators, 0 /* additionalPrecedingWordsCount */); if (null == range) return; // Happens if we don't have an input connection at all if (range.length() <= 0) return; // Race condition. No text to resume on, so bail out. |