Auto-save not saving code?

I have auto-save turned on, and it saves all the design changes I make.
However, it seems that unless I save manually, no code changes are saved.
Which is bad - lost a fair bit of code that I thought was saved because it said “saved” at the top of the page…

Anyone else finding this?
I’m using Chrome on a Mac.