You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to close an unsaved script and discard its changes, the changes are in fact not saved to disk. However, opening the script the next time will bring back the changes. In addition, the output console shows the following errors:
However x2, this only happens if the changes are syntactically correct.
Note: running the project seems to always load whatever is actually on disk.
Steps to reproduce:
Open any script
Add something like print(0) anywhere
Click File -> Close and choose Discard
Verify outside the editor that the changes have seemingly been discarded, but...
Open the file again, the changes are still there?
Change print(0) to something with invalid syntax like print(0*)
Close and reopen file, this time the changes got discarded??
It seems like Godot is checking the syntax and if it is correct, it stores the file contents in some sort of cache. Otherwise, it reverts back to the last syntactically correct edit. You can check this behavior by first copy-pasting print(0*) and reopening; the whole line will be removed. But if you first type print(0) and then add the asterisk, only the asterisk will get removed.
The text was updated successfully, but these errors were encountered:
When a script is modified and closed, selecting the discard option, the contents in the script cache are not actually discarded. Any action you take while the editor remains open loads the script contents from cache rather than disk. The only way to have the editor load the contents as they're on disk is to reload the project.
Godot version:
v3.2.2.stable.official
OS/device including version:
macOS Catalina 10.15.5 (19F101)
MacbookAir8,1
Issue description:
If you try to close an unsaved script and discard its changes, the changes are in fact not saved to disk. However, opening the script the next time will bring back the changes. In addition, the output console shows the following errors:
However x2, this only happens if the changes are syntactically correct.
Note: running the project seems to always load whatever is actually on disk.
Steps to reproduce:
print(0)
anywhereprint(0)
to something with invalid syntax likeprint(0*)
It seems like Godot is checking the syntax and if it is correct, it stores the file contents in some sort of cache. Otherwise, it reverts back to the last syntactically correct edit. You can check this behavior by first copy-pasting
print(0*)
and reopening; the whole line will be removed. But if you first typeprint(0)
and then add the asterisk, only the asterisk will get removed.The text was updated successfully, but these errors were encountered: