@DanielCollins said:
I would add one more thing to check first: how you close Notepad++ after removing the tabs. If you close the window with the X button, Notepad++ should save the session on exit, … Try closing with File > Exit after removing the tabs, then check whether the files stay closed on the next launch.
There is no difference between the X button and File > Close, as far as Notepad++'s saving of the session.
but if the program is still running in the background, for example after closing the window while it is minimized to the tray,
It staying on the system tray is an interesting idea. But your wording (by putting it between the “X” and the “File > Close” in your suggestions) implied strongly that using File > Close would behave differently regarding minimize/close-to-tray, which it does not. The only way to fully exit the application when it’s in close-to-tray mode is to use the tray-icon’s right-click menu and choose Close Tray Icon
But since @hixcube said, “and shut down my PC”, the system tray is not likely to be the culprit, because when Windows cleanly shuts down, it sends the proper messages to Notepad++, and Notepad++ should save the session while exiting. So, despite being an “interesting idea”, I don’t think it’s the root cause of the problem as described.
or if a second instance is open, the older session can be written back over the newer one.
I seem to remember saying that already. (“the instance that saves the session might not be the one you think”)
It is also worth checking Settings > Backup to see whether Periodic Backup is on,
No it’s not. The Debug Info already posted told us what that Periodic Backup is on. So checking it is redundant.
since that is separate from the session list and can bring back the contents of unsaved notes even when the tabs themselves are gone.
The whole point of the original complaint is that they had Notepad++ set to remember sessions, but closed files, and the files are coming back in the session even though they had been closed. The session feature does not bring back contents of tabs after the tabs have been closed.