Display predictions when the cursor is moved after a word.

Bug: 12951777
Change-Id: I744b98df6679edd34ca3c1392e38597325935932
main
Jean Chalard 2014-02-10 23:07:00 +09:00
parent fd9599e9c7
commit 38d31a5e79
1 changed files with 8 additions and 1 deletions

View File

@ -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 */);