I need to revert changes made to code

Hi,
An arduino IDE extension replaced the whole code of an .ino file and saved it, I already closed and opened the file (so Ctrl+Z ain't work I guess).

How do I revert the changes made to the file?

Does ArduinoIDE have some folder where it saves a copy of the last opened projects?