diff options
author | 2014-02-10 06:24:06 -0800 | |
---|---|---|
committer | 2014-02-10 06:24:06 -0800 | |
commit | 7a99f741d616dc39cdb59fc6f356bc64d0df4944 (patch) | |
tree | 98d778ca5a26e65312c2ff8a4979ca9141b8f1ef /java/src/com/android/inputmethod | |
parent | 4e778e50d1be80243fb7161165bb2e087c7835d9 (diff) | |
parent | 38d31a5e79c64e706e1698d2d24adb51c4ac53aa (diff) | |
download | latinime-7a99f741d616dc39cdb59fc6f356bc64d0df4944.tar.gz latinime-7a99f741d616dc39cdb59fc6f356bc64d0df4944.tar.xz latinime-7a99f741d616dc39cdb59fc6f356bc64d0df4944.zip |
am 38d31a5e: Display predictions when the cursor is moved after a word.
* commit '38d31a5e79c64e706e1698d2d24adb51c4ac53aa':
Display predictions when the cursor is moved after a word.
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 6e9050593..db0b7418b 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -1256,7 +1256,14 @@ public final class InputLogic { // If we don't know the cursor location, return. if (mConnection.getExpectedSelectionStart() < 0) return; final int expectedCursorPosition = mConnection.getExpectedSelectionStart(); - if (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)) return; + if (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)) { + // Show predictions. + mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime( + WordComposer.CAPS_MODE_OFF, + getNthPreviousWordForSuggestion(settingsValues.mSpacingAndPunctuations, 1)); + mLatinIME.mHandler.postUpdateSuggestionStrip(); + return; + } final TextRange range = mConnection.getWordRangeAtCursor( settingsValues.mSpacingAndPunctuations.mSortedWordSeparators, 0 /* additionalPrecedingWordsCount */); |