aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-04-23 17:02:41 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-23 17:02:41 -0700
commit5ee0ee0dbe316aac80949bd35f9834e46d5e2799 (patch)
treedb976eada2fa451da64a5ad3848734c538a0edfb /java/src
parent87f7fa12db26c0787392ba5d27659e1c9ee1a45a (diff)
parent96fb3094aaacf4bae65db54414a7aac285695245 (diff)
downloadlatinime-5ee0ee0dbe316aac80949bd35f9834e46d5e2799.tar.gz
latinime-5ee0ee0dbe316aac80949bd35f9834e46d5e2799.tar.xz
latinime-5ee0ee0dbe316aac80949bd35f9834e46d5e2799.zip
Merge "Fix a bug where a batch edit would not be started."
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e1978fca1..ddc710956 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1793,6 +1793,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
public void pickSuggestionManually(final int index, final CharSequence suggestion,
int x, int y) {
final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions();
+ final InputConnection ic = getCurrentInputConnection();
+ if (ic != null) ic.beginBatchEdit();
if (SPACE_STATE_PHANTOM == mSpaceState && suggestion.length() > 0) {
int firstChar = Character.codePointAt(suggestion, 0);
@@ -1810,7 +1812,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
mKeyboardSwitcher.updateShiftState();
resetComposingState(true /* alsoResetLastComposedWord */);
- final InputConnection ic = getCurrentInputConnection();
if (ic != null) {
final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index];
ic.commitCompletion(completionInfo);
@@ -1889,6 +1890,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mHandler.postUpdateSuggestions();
}
}
+ if (null != ic) ic.endBatchEdit();
}
/**