3 ms·
This was my first thought. A timeline is nice, but the problem with a linear undo history is that if you undo and then edit, you lose access to the state before
by bobbylarrybobby 6y ago
This was my first thought. A timeline is nice, but the problem with a linear undo history is that if you undo and then edit, you lose access to the state before you undid. A tree is clearly the right structure for undo history.
- wtetzner 6y agoYou could just append a new state to the end of the timeline when you “undo”, so you never lose history. This is how undo works in Emacs by default.
- Brian_K_White 6y agoHeck it's how boring business apps handle bookkeeping data since forever. You never delete a record to correct a mistake, you create a new record to do it.
- b3n 6y agoThe tree structure is inherently flawed for storing undos when using features like undoing within a specific region, because the new state doesn't map to any previous node on the tree. By default, Emacs has a linear undo structure, while still allowing you to never lose history.