-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(editor): allow undoing part-deletion of annotated text
Before this change, the editor would crash if you tried to undo deleting part of an annotated text (from behind). This is because undoing the `remove_text` operation results in an `insert_text` operation. And we have special logic in place to make sure that `insert_text` right after annotated text results in a new node without annotations. This not only results in an invalid state (we didn't want to the node to be split), but it also results in a subsequent crash when the selection stored on the undo stack would try to select inside the unsplit node.
- Loading branch information
1 parent
c91d54b
commit 42c2cdf
Showing
2 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters