-
Notifications
You must be signed in to change notification settings - Fork 290
Description
Package Version
Which package and version are you using? E.g., "super_editor, GitHub, stable branch"
super_editor: ^0.3.0-dev.36
User Info
To help us understand who is using Super Editor and for what purpose, please include your company name, or say "individual" if you're using it for yourself.
individual
To Reproduce
Steps to reproduce the behavior:
- enable history when creating editor.
- write "A B C D E"
- perform undo twice so that text becomes "A B C"
- now write "A B C" again so that text becomes "A B C A B C"
- now do redo. redo will work when it shouldn't. and the text will become: "A B C D E A B C"
This behaviour also leads to crashes sometimes. I see exceptions like:
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ RangeError (end): Invalid value: Not in inclusive range 0..29: 40
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ #0 package:attributed_text/src/attributed_text.dart 460:13 copyText
│ #1 package:attributed_text/src/attributed_text.dart 553:23 insertString
│ #2 package:super_editor/src/default_editor/text.dart 2164:21 execute
│ #3 package:super_editor/src/core/editor.dart 701:14 executeCommand
│ #4 package:super_editor/src/core/editor.dart 304:5 [_executeCommand]
│ #5 package:super_editor/src/core/editor.dart 457:28 redo
│ #6 package:alfred/features/editor/data/undo_redo_manager.dart 62:13 redo
│ #7 package:alfred/features/editor/ui/editor.dart 269:34
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
Actual behavior
What's the result of repeating the steps above?
Exception happens or weird redos happen.
Expected behavior
What should be the result of repeating the steps above (the desired behavior)?
Redo should do nothing once we write new things. _future list should be made empty.
Platform
Which device(s) and operating system(s) have experienced the problem?
Device - chrome web. OS - mac os.
Flutter version
Please list your Flutter and Dart version info. You can find this by running flutter --version at the command line.
3.35.7
Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Additional context
Add any other context about the problem here.
N/A