do a sanity check when setting composing text on text fields that have suggestions disabled

fixes #225
could cause unnecessary text / suggestion reloads or performance regressions, though not found in testing
This commit is contained in:
Helium314 2024-06-12 20:24:16 +02:00
parent 0e992dd8b9
commit 5b1f40f0f6
2 changed files with 19 additions and 2 deletions

View file

@ -2451,7 +2451,9 @@ public final class InputLogic {
spannable.setSpan(backgroundColorSpan, 0, spanLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING);
composingTextToBeSet = spannable;
}
mConnection.setComposingText(composingTextToBeSet, newCursorPosition);
if (!mConnection.setComposingText(composingTextToBeSet, newCursorPosition))
// inconsistency in set and found composing text, better cancel composing (should be restarted automatically)
mWordComposer.reset();
}
/**