Undo
In computing, "undo" is a command that reverses the last action or series of actions performed by a user. It is an essential function in most software applications that allows users to correct mistakes and experiment without the fear of making a permanent error. The opposite of "undo" is "redo," which restores the last undone action. The combination of undo and redo lets a user move back and forth through their action history.
How undo works
Action history: When you work in a program, the software stores a list of your recent actions in its memory. For example, in a word processor, this list might contain "typed text," "deleted sentence," and "changed font".
Command implementation: When the user initiates the undo command, the program goes back to the previously saved state by reversing the last action from its history.
Sequential reversal: In most applications, you can perform multiple consecutive undos to reverse several steps in the order they occurred.
Limitations: The action history is often temporary. It is usually cleared when you close the file or application, meaning you cannot undo actions taken in a previous session. Some major actions, such as saving a file, cannot be undone at all.