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
//! Undo/redo history. | |
//! | |
//! The simplest model of undo history consists of a single "undo stack." Every | |
//! operation pushes a history entry for the previous state onto the undo stack. | |
//! The "undo" action pops a history entry from the top of the undo stack and | |
//! restores it. | |
//! | |
//! To add "redo" functionality, we make an additional "redo stack." To undo an | |
//! action, we push an entry onto the redo stack and then pop an entry from the | |
//! undo stack to restore. To redo an action, we push an entry onto the undo |
OlderNewer