mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-22 16:27:41 +00:00
fix(android): Fix length used in context before restoring characters
This fixes a test scenario involving 6 emojis (SMP characters) and the p^p^ context. A backspace was removing an entire p^ grapheme. This fixes the contents of `newContext` that is used to determine the character sequence to restore
This commit is contained in:
parent
b452c57688
commit
091ed93b24
1 changed files with 1 additions and 1 deletions
|
|
@ -2096,7 +2096,7 @@ public final class KMManager {
|
|||
// subSequence indices are start(inclusive) to end(exclusive)
|
||||
CharSequence expectedChars = charsBackup.subSequence(0, charsBackup.length() - (dn + numPairs));
|
||||
ic.deleteSurroundingText(dn + numPairs, 0);
|
||||
CharSequence newContext = getCharacterSequence(ic, originalBufferLength - dn);
|
||||
CharSequence newContext = getCharacterSequence(ic, originalBufferLength - 2*dn);
|
||||
|
||||
CharSequence charsToRestore = CharSequenceUtil.restoreChars(expectedChars, newContext);
|
||||
if (charsToRestore.length() > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue