Never let the cursor go < 0

Fixes APP-WX
This commit is contained in:
Vishesh Handa
2021-03-02 10:46:03 +01:00
parent 9d12848289
commit d675177eef

View File

@ -36,6 +36,10 @@ class TextEditorState {
TextEditorState.fromValue(TextEditingValue val) {
text = val.text;
cursorPos = val.selection.baseOffset;
if (cursorPos == -1) {
cursorPos = 0;
}
}
TextEditingValue toValue() {