Undo is a command in many computer programs. It erases the last change done to the document reverting it to an older state. In some more advanced programs such as graphic processing, undo will negate the last command done to the file being edited.
The opposite of undo is redo. The redo command reverses the undo or advances the buffer to a more current state.
In most Windows applications, the Undo command is activated by pressing the Ctrl+Z or Alt+Backspace keybindings. In all Macintosh applications, the Undo command is activated by pressing Command-Z. The common command for Redo on Microsoft Windows systems is Ctrl+Y or Ctrl+Shift+Z. The common command for Redo on Apple Macintosh systems is Command-Shift-Z.
The ability to undo an operation on a computer was independently invented multiple times, as a response to how people used computers.
The Xerox PARC Bravo text editor had an Undo command in 1974. Behavioral Issues in the Use of Interactive Systems, a 1976 research report by Lance A. Miller and John C. Thomas of IBM, noted that "It would be quite useful to permit users to 'take back' at least the immediately preceding command (by issuing some special 'undo' command)." The programmers at the Xerox PARC research center assigned the keyboard shortcut Ctrl-Z to the undo command, which became a crucial feature of text editors and word processors in the personal computer era.
Multi-level undo commands were introduced in the 1980s, allowing the users to take back a series of actions, not just the most recent one. AtariWriter, a word-processing application introduced in 1982, featured undo. NewWord, another word-processing program released by NewStar in 1984, had an unerase command. IBM's VisiWord also had an undelete command.
Undo and redo modelsEdit
Undo models can be categorized as linear or non-linear:
- Linear undo requires the user to revert the latest action before undoing earlier ones.
- With non-linear undo, the action to be reversed can be freely picked from the action history list. Non-linear undo can be further subcategorized into direct selective undo, script interpretation undo, and cascading undo.
When multiple users can edit the same document simultaneously, a multi-user undo is needed. Global multi-user undo reverts the latest action made to the document, regardless of who performed the edit. Local multi-user undo only reverts actions done by the local user, which requires a non-linear undo implementation.
Where undo can be used to backtrack through multiple edits, the redo command goes forward through the action history. Making a new edit usually clears the redo list. If a branching redo model is used, the new edit branches the action history.
The number of previous actions that can be undone varies by program, version, and hardware or software capabilities. For example, the default undo/redo stack size in Adobe Photoshop is 20 but can be changed by the user. As another example, earlier[when?] versions of Microsoft Paint only allowed up to three edits to be undone; the version introduced in Windows 7 increased this limit to 50.
Simplistic, single-edit undo features sometimes do away with "redo" by treating the undo command itself as an action that can be undone. This is known as the flip undo model, because the user can flip between two program states using the undo command. This was the standard model prior to the widespread adoption of multiple-level undo in the early 1990s.
The Command pattern is a software design pattern which can be used to implement Multi-level Undo. The Memento pattern is useful for capturing the state of the program before user actions. This can be used for state reversal needed in some undo implementations.
- Moran, Chuktropolis Welling (2013-01-01). Interactive Time (Ph.D.). La Jolla: University of California, San Diego. ISBN 9781303194450.
- Barnet, Belinda (2014-12-01). Memory Machines: The Evolution of Hypertext. Anthem Press. p. 108. ISBN 9781783083442.
- Barnet, Belinda (2010-01-01). "Crafting the User-Centered Document Interface: The Hypertext Editing System (HES) and the File Retrieval and Editing System (FRESS)". 4 (1).
- Teitelman, Warren (1972-01-01). "Automated Programmering: The Programmer's Assistant". Proceedings of the December 5-7, 1972, Fall Joint Computer Conference, Part II. AFIPS '72 (Fall, part II). New York, NY, USA: ACM: 917–921. doi:10.1145/1480083.1480119.
- "Bravo Manual in Alto Non-Programmers Guide, p. 52" (PDF). Retrieved 2014-03-29.
- Miller, Lance A.; John C. Thomas Jr. (December 1976). "Behavioral Issues in the Use of Interactive Systems" (PDF). Retrieved 2011-05-21.
- Ben Zimmer (2009-09-15). "The Age of Undoing". New York Times. Retrieved 2013-06-02.
- Roberta Mancini, Alan Dix and Stefano Levialdi. 2006. "Reflections on Undo"
|Look up undo in Wiktionary, the free dictionary.|
- The Age of Undoing - Article about the linguistic history of Undo at The New York Times Magazine.
- Cascading undo control - a paper focused on what is cascading undo and how it might be presented to users
- Cascading undo prototype: Fisheye-detail - prototype of proposed visualizations
- Cascading undo prototype: Fisheye-scrollbar - prototype of proposed visualizations
- Undo & Redo Shortcuts - in Excel