diff options
author | 2011-10-03 15:50:11 +0900 | |
---|---|---|
committer | 2011-10-03 17:18:29 +0900 | |
commit | cd95a365586b2b5f9a3639b72a2befdac7ada8a4 (patch) | |
tree | dd95d83d26487387d71feea8c12bb4fedde0cc88 | |
parent | 397f6f8299a8acd645e4cc88eead7a345c198044 (diff) | |
download | latinime-cd95a365586b2b5f9a3639b72a2befdac7ada8a4.tar.gz latinime-cd95a365586b2b5f9a3639b72a2befdac7ada8a4.tar.xz latinime-cd95a365586b2b5f9a3639b72a2befdac7ada8a4.zip |
Fix a bug where moving the cursor would not reset selection
This change updates suggestions when the cursor is moved.
It is now reasonable to remove the explicit test for
TextEntryState.isAcceptedDefault because it is now shielded
by mExpectingUpdateSelection : actually, this probably fixes
a long-standing bug.
Bug: 5337309
Change-Id: Iee4046420c6a88d1a07d428230f93c3ebef25c39
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 83b79f74c..224618ecc 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -895,20 +895,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } mComposingStringBuilder.setLength(0); mHasUncommittedTypedChars = false; - if (isCursorTouchingWord()) { - mHandler.cancelUpdateBigramPredictions(); - mHandler.postUpdateSuggestions(); - } else { - setPunctuationSuggestions(); - } TextEntryState.reset(); + updateSuggestions(); final InputConnection ic = getCurrentInputConnection(); if (ic != null) { ic.finishComposingText(); } mVoiceProxy.setVoiceInputHighlighted(false); - } else if (!mHasUncommittedTypedChars && TextEntryState.isAcceptedDefault()) { + } else if (!mHasUncommittedTypedChars) { TextEntryState.reset(); + updateSuggestions(); } mJustAddedMagicSpace = false; // The user moved the cursor. mJustReplacedDoubleSpace = false; @@ -1654,6 +1650,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return; } + mHandler.cancelUpdateSuggestions(); + mHandler.cancelUpdateOldSuggestions(); + mHandler.cancelUpdateBigramPredictions(); + if (!mHasUncommittedTypedChars) { setPunctuationSuggestions(); return; |