aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-02-06 01:47:13 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-02-06 01:47:13 -0800
commitddbaddb00d19c885c2fb6d1254757cfd715b3bf5 (patch)
tree8259adc429321b70aa500f609963c6468507e880 /java/src/com/android/inputmethod/latin/LatinIME.java
parented348a48460a56047d045d5e2356c1b1286388b1 (diff)
parenta7f2500001c53dc5a6de9c2525a75229cc7c6645 (diff)
downloadlatinime-ddbaddb00d19c885c2fb6d1254757cfd715b3bf5.tar.gz
latinime-ddbaddb00d19c885c2fb6d1254757cfd715b3bf5.tar.xz
latinime-ddbaddb00d19c885c2fb6d1254757cfd715b3bf5.zip
am a7f25000: Fix a bug with common objects.
* commit 'a7f2500001c53dc5a6de9c2525a75229cc7c6645': Fix a bug with common objects.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 24007f95a..e4339318b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2201,9 +2201,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// new composing text.
final int restartLength = mWordComposer.size();
if (DEBUG) {
- final String wordBeforeCursor =
- ic.getTextBeforeCursor(restartLength + 1, 0).subSequence(0, restartLength)
- .toString();
+ final String wordBeforeCursor = ic.getTextBeforeCursor(restartLength, 0).toString();
if (!TextUtils.equals(mWordComposer.getTypedWord(), wordBeforeCursor)) {
throw new RuntimeException("restartSuggestionsOnManuallyPickedTypedWord "
+ "check failed: we thought we were reverting \""
@@ -2212,8 +2210,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
+ wordBeforeCursor + "\"");
}
}
- // Warning: this +1 takes into account the extra space added by the manual pick process.
- ic.deleteSurroundingText(restartLength + 1, 0);
+ ic.deleteSurroundingText(restartLength, 0);
ic.setComposingText(mWordComposer.getTypedWord(), 1);
mHandler.cancelUpdateBigramPredictions();
mHandler.postUpdateSuggestions();