Warning option when closing multiple, unedited files
-
Hi, I’ve done quite a bit of searching and can’t find an answer to this. Is there any way to specify a preference that gives a warning when you’re closing Notepad++ and you have multiple, unedited files open? Sometimes I may have several files open in Notepad++ that I’m checking something in, and if I close Notepad++ all the files are closed automatically even if I don’t want them to. It’d be helpful to have the option to have a warning message that you’re closing multiple tabs/files even if you haven’t edited them, in case you close the entire program without meaning to. It would be similar to this warning, in this case with the Opera browser.
Thanks in advance for any help.
-
When you have Settings > Preferences > Backup > Remember current session for next launch turned on, Notepad++ will remember what files you had open, and will have those same files open the next time you launch Notepad++. Because you lose nothing if none of the files had unsaved changes, and your list of files is preserved, the Notepad++ developer doesn’t think it’s worth an annoying popup in that case.
And if you turn off the remember-session option, the Notepad++ developer assumes you understood the consequences of turning off remember-session, which include the fact that multiple files can be closed when you exit Notepad++ – but, again, because Notepad++ adds all the files that you had open to the Recent Files list when it exited in that condition, the list of files is all there, so you again lost no information (unless you have more than N recent files (where N is set in Settings > Preferences > Recent Files History
I’ve done quite a bit of searching and can’t find an answer to this.
I am not sure what search terms you used, because I would have thought that such searches would pull up both this forum’s Backup FAQ, and the backup preferences and/or the [session feature description] in the User Manual. (And even if a generic web search doesn’t bring them up, because the terms weren’t exactly right, checking FAQs in forums is always a good idea, as is looking through the user manual.)
-
@David-Mack said in Warning option when closing multiple, unedited files:
Is there any way to specify a preference that gives a warning when you’re closing Notepad++ and you have multiple, unedited files open?
It’s been requested several times, but never implemented. I think this is the latest, open issue:
to which you could add your appeal. There is also a solution there using python scripting from @Alan-Kilborn and a pull request that was rejected after quite a bit of discussion. The developer of Notepad++ ended that discussion saying, “If there are still such requests coming, please ping me - I’ll see what I can do about it,” so it sounds like it might still be possible to make it happen.