mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-26 00:29:20 +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) {
|
||||
text = val.text;
|
||||
cursorPos = val.selection.baseOffset;
|
||||
|
||||
if (cursorPos == -1) {
|
||||
cursorPos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
TextEditingValue toValue() {
|
||||
|
Reference in New Issue
Block a user