aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-11-22 02:04:26 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-22 02:04:26 -0800
commitc24ef338391b4600b475d14e8ef4d725b8e2d1b6 (patch)
treec3c324aabe953d7b41fa760a1a3c022ec295daff /java/src
parent8f1b729eb16f87e1f67c4922c26ebd014d254a3d (diff)
parent6d1cbbc2ffb9d7046189174ec68b5b72bbc154b3 (diff)
downloadlatinime-c24ef338391b4600b475d14e8ef4d725b8e2d1b6.tar.gz
latinime-c24ef338391b4600b475d14e8ef4d725b8e2d1b6.tar.xz
latinime-c24ef338391b4600b475d14e8ef4d725b8e2d1b6.zip
am 6d1cbbc2: Fix a bug with single quotes
* commit '6d1cbbc2ffb9d7046189174ec68b5b72bbc154b3': Fix a bug with single quotes
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dc5ec2d86..f4a1c6a1d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1539,16 +1539,15 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if ((isAlphabet(code) || mSettingsValues.isSymbolExcludedFromWordSeparators(code))
&& isSuggestionsRequested() && !isCursorTouchingWord()) {
if (!mHasUncommittedTypedChars) {
- mHasUncommittedTypedChars = true;
+ // Reset entirely the composing state anyway, then start composing a new word unless
+ // the character is a single quote.
+ mHasUncommittedTypedChars = (Keyboard.CODE_SINGLE_QUOTE != code);
mComposingStringBuilder.setLength(0);
mWordComposer.reset();
clearSuggestions();
mComposingStateManager.onFinishComposingText();
}
}
- if (code == Keyboard.CODE_SINGLE_QUOTE && !isCursorTouchingWord()) {
- mHasUncommittedTypedChars = false;
- }
final KeyboardSwitcher switcher = mKeyboardSwitcher;
if (switcher.isShiftedOrShiftLocked()) {
if (keyCodes == null || keyCodes[0] < Character.MIN_CODE_POINT