Undo and Redo Last Edit

Reference:        Script Editor Toolbar and Edit Menu 

Undo or redo the most recent edits.  This allows you to reposition the edit stream to some prior operation.  The undo button allows you to “back up” in your editing process and undo changes.  The redo button allows you to move forward should you undo too far.  The redo button is disabled as soon as you take an action that starts a new edit stream.  Undo is available from the keyboard using Ctrl+Z.  Redo is available from the keyboard using Ctrl+Y.

Warning:  Once you begin editing, any changes that have been undone are lost.  They cannot be redone.  This is indicated by the disabling of the redo button.  If you are repositioning the edit stream, be sure you are at the right point before you touch any keys or move the cursor with the mouse.