Description:
The undo history in the script editor is cleared entirely when a “Replace All” action is done through the Find/Replace widget. This happens every time “Replace All” is done in any script.
That means it is currently impossible to revert any changes in scripts that you’ve made using the “Replace All” option on the Find/Replace widget. If I accidentally replace something wrong, or replace it with the wrong text (such that I cannot easily undo it with another “Replace All”), I have to open an old version of the file and hope I can get my text before “Replace All” back.
Moreover, I cannot roll back to an earlier version of my script by undoing several times either, since the undo history before the “Replace All” is also gone.
Repro:
- Open any script in any place whatsoever.
- Make some changes manually, such as adding/changing a few words (results in states being pushed onto the undo stack).
- Open the Find/Replace widget.
- Do a “Replace All” action from any string that occurs in your script, to whatever string you want.
- Afterwards, it is not possible to undo any actions (not the “Replace All”, nor the actions before that).