I see that once I open a new file and write something in it, even if I don't save it, that file will also open when I open notepad++ again. So how is saving the state of the workspace in notepad++ implemented, even if I don't save it? Can anyone point me to the source code for it's implementation?
Thanks!
Fairly simple: There's a session.xml file in the user-folder which saves which files were opened and contains a link to them. If a file was not saved yet, it is also stored in the user folder. The user folder in Windows is here:
C:\Users\your user\AppData\Roaming\Notepad++
There's the session.xml. Open it in any editor and you see the open files. The not saved files point to the backup folder with a filename like new 1@2015-10-05_114609 Hope that helped a little.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With