aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputConnection.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-10 15:53:19 +0900
committerJean Chalard <jchalard@google.com>2014-03-10 15:55:15 +0900
commite93a7232d17caffdca2ab3f62881ab0ae31f1cd5 (patch)
treeef50196d08b23687d5d88293233adfbf55f9919c /java/src/com/android/inputmethod/latin/RichInputConnection.java
parente07a777ed6f97549c7816265b1df98e6611719ca (diff)
downloadlatinime-e93a7232d17caffdca2ab3f62881ab0ae31f1cd5.tar.gz
latinime-e93a7232d17caffdca2ab3f62881ab0ae31f1cd5.tar.xz
latinime-e93a7232d17caffdca2ab3f62881ab0ae31f1cd5.zip
Don't reset the value needed before it's used
Nice recipe for failure Bug: 13387534 Change-Id: Ida1978449c1997587b2ec0955c5c94fcef336121
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 323256d1c..965518e34 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -357,9 +357,9 @@ public final class RichInputConnection {
mExpectedSelEnd -= beforeLength;
} else {
// There are fewer characters before the cursor in the buffer than we are being asked to
- // delete. Only delete what is there.
- mExpectedSelStart = 0;
+ // delete. Only delete what is there, and update the end with the amount deleted.
mExpectedSelEnd -= mExpectedSelStart;
+ mExpectedSelStart = 0;
}
if (null != mIC) {
mIC.deleteSurroundingText(beforeLength, afterLength);