Skip to main content

tom_undo 0.3.0 copy "tom_undo: ^0.3.0" to clipboard
tom_undo: ^0.3.0 copied to clipboard

The undo/redo stack every undo history runs on: a bounded stack that applies an entry before moving it, so a failing undo stays undoable, and composite steps that put back what they applied when one p [...]

Changelog #

0.3.0 #

  • maxEntries is settable: a lower bound drops the oldest undo entries and the furthest redo entries at once, so a depth setting takes effect on an open history.

0.2.0 #

  • undoAsync and redoAsync are serialised: one started while another is still applying waits for it, so two overlapping undos apply two entries, each once, newest first. isApplying says whether one is running.
  • A synchronous undo or redo started while an asynchronous one applies throws StateError instead of applying the same entry a second time.
  • An entry removed (by clear) while it is being applied is not put back onto the other stack.

0.1.0 #

  • TomUndoStack<E>: bounded, a push clears redo, and an entry is applied first and moved second, so a failed undo leaves the history as it was; synchronous and asynchronous application, and popNewest for merging an act into the one before it. tomApplyAll and tomApplyAllAsync apply a composite step atomically, putting back what they applied when an item throws. Taken out of tom_forge_core (where it was ForgeUndoStack, forgeApplyAll, forgeApplyAllAsync) before its first release.
0
likes
150
points
1.03k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

The undo/redo stack every undo history runs on: a bounded stack that applies an entry before moving it, so a failing undo stays undoable, and composite steps that put back what they applied when one part fails. No dependencies.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on tom_undo