aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-11-09 19:16:37 +0900
committerJean Chalard <jchalard@google.com>2012-11-09 19:16:37 +0900
commit01d47b809617aee03e240a6b4b41013269547bc1 (patch)
treecda12f3118bbc7e731ba508fa3cc50102457a7cb /java/src
parent710d06cea91a8e6bf04a27f0bcd88d76a5cc5acd (diff)
downloadlatinime-01d47b809617aee03e240a6b4b41013269547bc1.tar.gz
latinime-01d47b809617aee03e240a6b4b41013269547bc1.tar.xz
latinime-01d47b809617aee03e240a6b4b41013269547bc1.zip
Fix a logic flaw.
This test is seriously wrong : although we do have a method that does exactly the right thing, this looks at a very specific, unrelated variable state in hope it happens to be set only in the relevant cases by the play of logic. I don't think this changes anything concretely, as the assumption was probably true in the practice ; still, this code is very hard to read and prone to unexpected breakage. Change-Id: I77ab576f90762429fcc752df31ed30e1c81871dc
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index fa93357a4..abcc9055d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1619,8 +1619,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
if (mWordComposer.isComposingWord()) {
final int length = mWordComposer.size();
if (length > 0) {
- // Immediately after a batch input.
- if (SPACE_STATE_PHANTOM == spaceState) {
+ if (mWordComposer.isBatchMode()) {
mWordComposer.reset();
} else {
mWordComposer.deleteLast();