How does atom handle Undo / Redo?

Hello,

I have a hard time figuring out how does Atom handle the Undo / Redo history. Sometimes, it seems to be persistent across tab/editor closing, other times not. When I say “persistent” I mean that I can Undo after closing and opening a given file again.

So, how does atom handle Undo / Redo ?

Is there a way to control that behavior (say, persist the last N items in the Undo history despite tabs/editor being closed and re-opened)?

Hello,
Any information on this would be much appreciated.