tom_undo 0.3.0
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 #
maxEntriesis 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 #
undoAsyncandredoAsyncare serialised: one started while another is still applying waits for it, so two overlapping undos apply two entries, each once, newest first.isApplyingsays whether one is running.- A synchronous
undoorredostarted while an asynchronous one applies throwsStateErrorinstead 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, andpopNewestfor merging an act into the one before it.tomApplyAllandtomApplyAllAsyncapply a composite step atomically, putting back what they applied when an item throws. Taken out oftom_forge_core(where it wasForgeUndoStack,forgeApplyAll,forgeApplyAllAsync) before its first release.