Don't reset the value needed before it's used

Nice recipe for failure

Bug: 13387534
Change-Id: Ida1978449c1997587b2ec0955c5c94fcef336121
main
Jean Chalard 2014-03-10 15:53:19 +09:00
parent e07a777ed6
commit e93a7232d1
1 changed files with 2 additions and 2 deletions

View File

@ -357,9 +357,9 @@ public final class RichInputConnection {
mExpectedSelEnd -= beforeLength; mExpectedSelEnd -= beforeLength;
} else { } else {
// There are fewer characters before the cursor in the buffer than we are being asked to // There are fewer characters before the cursor in the buffer than we are being asked to
// delete. Only delete what is there. // delete. Only delete what is there, and update the end with the amount deleted.
mExpectedSelStart = 0;
mExpectedSelEnd -= mExpectedSelStart; mExpectedSelEnd -= mExpectedSelStart;
mExpectedSelStart = 0;
} }
if (null != mIC) { if (null != mIC) {
mIC.deleteSurroundingText(beforeLength, afterLength); mIC.deleteSurroundingText(beforeLength, afterLength);