aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputConnection.java
diff options
context:
space:
mode:
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);