dont store cursor position when it can be reloaded before actually using the position

should fix #935
also make expected selection start / end private (access still via get methods)
This commit is contained in:
Helium314 2024-07-03 22:30:47 +02:00
parent a92d108444
commit e57e2e8de5
2 changed files with 6 additions and 6 deletions

View file

@ -99,12 +99,12 @@ public final class RichInputConnection implements PrivateCommandPerformer {
* It's not really the selection start position: the selection start may not be there yet, and
* in some cases, it may never arrive there.
*/
public int mExpectedSelStart = INVALID_CURSOR_POSITION; // in chars, not code points
private int mExpectedSelStart = INVALID_CURSOR_POSITION; // in chars, not code points
/**
* The expected selection end. Only differs from mExpectedSelStart if a non-empty selection is
* expected. The same caveats as mExpectedSelStart apply.
*/
public int mExpectedSelEnd = INVALID_CURSOR_POSITION; // in chars, not code points
private int mExpectedSelEnd = INVALID_CURSOR_POSITION; // in chars, not code points
/**
* This contains the committed text immediately preceding the cursor and the composing
* text, if any. It is refreshed when the cursor moves by calling upon the TextView.