diff options
author | 2012-07-06 17:50:35 +0900 | |
---|---|---|
committer | 2012-07-06 17:51:10 +0900 | |
commit | 4fde56b8182514bcae64d76488724d2a64a73f14 (patch) | |
tree | 3f6ba809013985286d3966a94fc9a3d85527bf60 /java/src | |
parent | 362ea3cacbe1f19625f6a75e2bd7cd5de33fe0f2 (diff) | |
download | latinime-4fde56b8182514bcae64d76488724d2a64a73f14.tar.gz latinime-4fde56b8182514bcae64d76488724d2a64a73f14.tar.xz latinime-4fde56b8182514bcae64d76488724d2a64a73f14.zip |
Fix a bug where spaces would be forgotten
Bug: 6785706
Change-Id: Ic7bf242ef058d116b986d47ad197b6d2802e2342
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 78b7eaa44..047bc734f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1799,6 +1799,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)) @@ -1816,7 +1817,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) { @@ -1837,6 +1837,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; |