diff options
author | 2013-11-27 18:20:10 +0900 | |
---|---|---|
committer | 2013-11-28 11:41:23 +0900 | |
commit | da459787e23bc790317d8c0d74a4675b9a8f2de8 (patch) | |
tree | a0623d66ce4eb4f72a647946cbf22a234b055e12 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 4735e1d32a15e96c945ddcaebbda920ae75e6a86 (diff) | |
download | latinime-da459787e23bc790317d8c0d74a4675b9a8f2de8.tar.gz latinime-da459787e23bc790317d8c0d74a4675b9a8f2de8.tar.xz latinime-da459787e23bc790317d8c0d74a4675b9a8f2de8.zip |
Fix getNthPreviousWord.
This should take into accounts word connectors.
Change-Id: Ic7fa5c837cd65a43ba43d7ae9d299b8d20019892
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 2e5bb19d6..d14066c54 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -2541,7 +2541,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (currentSettings.mCurrentLanguageHasSpaces) { // If we are typing in a language with spaces we can just look up the previous // word from textview. - return mConnection.getNthPreviousWord(currentSettings.mWordSeparators, + return mConnection.getNthPreviousWord(currentSettings, mWordComposer.isComposingWord() ? 2 : 1); } else { return LastComposedWord.NOT_A_COMPOSED_WORD == mLastComposedWord ? null @@ -2832,7 +2832,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final UserHistoryDictionary userHistoryDictionary = mUserHistoryDictionary; if (userHistoryDictionary == null) return null; - final String prevWord = mConnection.getNthPreviousWord(currentSettings.mWordSeparators, 2); + final String prevWord = mConnection.getNthPreviousWord(currentSettings, 2); final String secondWord; if (mWordComposer.wasAutoCapitalized() && !mWordComposer.isMostlyCaps()) { secondWord = suggestion.toLowerCase(mSubtypeSwitcher.getCurrentSubtypeLocale()); |