Saving the file also clears the undo cache IIRC, which is a bit annoying.