Home

Undo

Undo is an operation in computer software that reverses the effects of one or more prior actions, restoring the state of a document or application to a previous point. It is typically provided as part of an undo/redo mechanism that records changes in a history stack or via periodic snapshots. When the user triggers undo, the system applies the inverse of the most recent action or loads the previous snapshot, moving that state onto a redo stack so the change can be reapplied if desired.

Most systems implement undo with a stack of actions. Each reversible action stores enough information to reverse

Common interfaces include keyboard shortcuts such as Ctrl+Z or Cmd+Z to undo, and Ctrl+Y or Cmd+Shift+Z to

Limitations include that not all actions are undoable; some irreversible operations may permanently discard data. Undo

In collaborative editing, undo can be complex because concurrent edits must be reconciled. Some systems use

Beyond editors, the concept also appears in databases and version control, where transactions or commits provide

itself.
Some
systems
store
full
state
snapshots
for
larger
changes
but
consume
more
memory.
Actions
can
be
grouped
into
a
single
undo
unit,
so
a
sequence
of
edits
can
be
undone
together.
redo.
Menus
labeled
Undo
and
Redo
provide
alternate
access.
history
may
be
lost
on
closing
an
application
unless
a
persistent
history
is
implemented,
and
memory
or
performance
constraints
can
limit
how
much
history
is
kept.
techniques
such
as
operational
transformation
or
conflict-free
replicated
data
types
to
maintain
consistent
histories.
a
way
to
revert
to
earlier
states.
See
also
redo,
version
history.