Edit>Undo (shortcut: Control-Z) undoes the effects of the most recent text editing command. For example, this can be used to restore unintentionally deleted text. More complicated operations, such as a search and replace, can also be undone. By default, the undo queue remembers the last 100 edits; older edits are discarded. The undo queue size can be changed in the Editing pane of the Utilities>Global Options dialog box.
Edit>Redo (shortcut: Control-R) goes forward in the undo queue, redoing changes which were undone. For example, if some text was inserted, Undo will remove it from the buffer. Redo will insert it again.