diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 0baa3ba65..243a5f64e 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1567,11 +1567,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Returns true if we did an autocorrection, false otherwise. private boolean handleSeparator(final int primaryCode, final int x, final int y, final int spaceState) { - // Should dismiss the "Touch again to save" message when handling separator - if (mSuggestionsView != null && mSuggestionsView.dismissAddToDictionaryHint()) { - mHandler.postUpdateSuggestions(); - } - boolean didAutoCorrect = false; // Handle separator if (mWordComposer.isComposingWord()) { @@ -1827,6 +1822,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen return; } + mConnection.beginBatchEdit(); if (SPACE_STATE_PHANTOM == mSpaceState && suggestion.length() > 0) { int firstChar = Character.codePointAt(suggestion, 0); if ((!mCurrentSettings.isWeakSpaceStripper(firstChar)) @@ -1844,7 +1840,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mKeyboardSwitcher.updateShiftState(); resetComposingState(true /* alsoResetLastComposedWord */); final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index]; - mConnection.beginBatchEdit(); mConnection.commitCompletion(completionInfo); mConnection.endBatchEdit(); if (ProductionFlag.IS_EXPERIMENTAL) { @@ -1865,6 +1860,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mExpectingUpdateSelection = true; commitChosenWord(suggestion, LastComposedWord.COMMIT_TYPE_MANUAL_PICK, LastComposedWord.NOT_A_SEPARATOR); + mConnection.endBatchEdit(); // Don't allow cancellation of manual pick mLastComposedWord.deactivate(); mSpaceState = SPACE_STATE_PHANTOM; @@ -2053,7 +2049,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Since we just changed languages, we should re-evaluate suggestions with whatever word // we are currently composing. If we are not composing anything, we may want to display // predictions or punctuation signs (which is done by updateBigramPredictions anyway). - if (mConnection.isCursorTouchingWord(mCurrentSettings)) { + if (mWordComposer.isComposingWord()) { mHandler.postUpdateSuggestions(); } else { mHandler.postUpdateBigramPredictions(); |