The Arduino does not save when you compile/upload. IMO that is silly. I have lost several sketches when my PC crashed and I did not save.
I would not want it to as I often do some modifications to a sketch, only to then upload it and revert back to the old version.
Most IDE's have the undo buffer persist beyond saving. That is what I would normally do. Not sure if the Arduino IDE does that.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16