mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Remove useless code.
The only use of mDeleteCount is to implement delete acceleration. It's reset at each non-delete code point, and is guarded by a timer. Plus, ultimately we want to remove this completely : acceleration should be implemented by actually deleting stuff faster, not by deleting several code points at a time. Change-Id: Ia3144860b3aa2499034f2a2a7c81f32087af9598
This commit is contained in:
parent
1194b2b204
commit
548716d6d9
@ -2030,7 +2030,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||
}
|
||||
|
||||
private void handleBackspace(final int spaceState) {
|
||||
// We revert this in this method if the deletion doesn't happen.
|
||||
mDeleteCount++;
|
||||
|
||||
// In many cases, we may have to put the keyboard in auto-shift state again. However
|
||||
@ -2124,9 +2123,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||
}
|
||||
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
|
||||
if (codePointBeforeCursor == Constants.NOT_A_CODE) {
|
||||
// Nothing to delete before the cursor. We have to revert the deletion count
|
||||
// that was updated at the beginning of this method.
|
||||
mDeleteCount--;
|
||||
// Nothing to delete before the cursor.
|
||||
return;
|
||||
}
|
||||
final int lengthToDelete =
|
||||
|
Loading…
x
Reference in New Issue
Block a user