revert method

  1. @override
void revert(
  1. FluentDocument document
)
override

Revert this delta (undo). Replaces affected nodes with their pre-mutation state and restores the pre-mutation cursor.

Implementation

@override
void revert(FluentDocument document) {
  _replaceNodes(document, changes.map((c) => (c.index, c.oldJson)));
  oldCursor.restore(document);
}