Display predictions when the cursor is moved after a word.
Bug: 12951777 Change-Id: I744b98df6679edd34ca3c1392e38597325935932
This commit is contained in:
parent
fd9599e9c7
commit
38d31a5e79
1 changed files with 8 additions and 1 deletions
|
@ -1256,7 +1256,14 @@ public final class InputLogic {
|
||||||
// If we don't know the cursor location, return.
|
// If we don't know the cursor location, return.
|
||||||
if (mConnection.getExpectedSelectionStart() < 0) return;
|
if (mConnection.getExpectedSelectionStart() < 0) return;
|
||||||
final int expectedCursorPosition = mConnection.getExpectedSelectionStart();
|
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(
|
final TextRange range = mConnection.getWordRangeAtCursor(
|
||||||
settingsValues.mSpacingAndPunctuations.mSortedWordSeparators,
|
settingsValues.mSpacingAndPunctuations.mSortedWordSeparators,
|
||||||
0 /* additionalPrecedingWordsCount */);
|
0 /* additionalPrecedingWordsCount */);
|
||||||
|
|
Loading…
Reference in a new issue