Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Notepad++ save the state of the workspace?

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!

like image 498
user3248186 Avatar asked Oct 18 '22 23:10

user3248186


1 Answers

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.

like image 157
Roemer Avatar answered Nov 09 '22 10:11

Roemer