mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
Never let the cursor go < 0
Fixes APP-WX
This commit is contained in:
@ -36,6 +36,10 @@ class TextEditorState {
|
|||||||
TextEditorState.fromValue(TextEditingValue val) {
|
TextEditorState.fromValue(TextEditingValue val) {
|
||||||
text = val.text;
|
text = val.text;
|
||||||
cursorPos = val.selection.baseOffset;
|
cursorPos = val.selection.baseOffset;
|
||||||
|
|
||||||
|
if (cursorPos == -1) {
|
||||||
|
cursorPos = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditingValue toValue() {
|
TextEditingValue toValue() {
|
||||||
|
Reference in New Issue
Block a user