If you make a mistake while editing text, Edit>Undo (keyboard equivalent: Control-Z) will undo the most recently performed action. For example, if some text was deleted, this will bring it back again. Up to 100 actions can be undone.
Edit>Redo (keyboard equivalent: Control-R) will redo the most recently undone action. For example, if some text was deleted, invoking Undo will make the text come back again. Invoking Redo after it was undone will once again delete that text.