Description
Godot version
3.3.2.stable.official
System information
Ubuntu
Issue description
Closing a gdscript in the editor and choosing "Discard" and then immediately re-opening it, actually loads its last state, while not actually saving the changes on file (at least).
This is very dangerous because it can lead to loose massive amounts of coding, especially if one does not know that the actual file has not been actually overwritten with the discarded content.
Steps to reproduce
- Open the example project, or just create an empty project with at least two gdscripts.
- Open both scripts in the editor.
- Change one of the script, then close it, either by using the script list on the left or the context menu.
- Immediately re-open the script.
- See that the last state of the content of the script is given to the user, exactly as it was, even though you chose "Discard".
Update: having multiple scripts opened may not be needed to reproduce the bug.