Undo - Redo
There is an unlimited undo stack for each loaded file.
You must be careful since several windows can display the same file: undo may cancel a change made in another window if the focus is in the wrong pane. Anyway an undo operation can always be undone with the redo command.