Search code examples
language-agnosticuser-interfaceundo-redo

should a save clear the undo/redo stacks?


When the user saves changes in an application, should the undo/redo stacks be cleared? Would it be abnormal to be able to undo to a state before a save?


Solution

  • I would say the answer to both of these questions is no.

    (For instance, what if you change something, save it, and then discover it leads to unwanted behaviour? It makes sense to be able to uncommit that save by undoing your changes to the previous state, allowing you to save them.)