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. (If you want more, change the undo queue size in the Editor pane of the Utilities>Global Options dialog box.)
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.