New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement Win10+ app-restart feature in Notepad++ #14074
Conversation
It will allow for the Notepad++ to be a "restartable app", like some other SW can do today (eg Google Chrome, Mozilla Firefox or all the Microsoft UWP apps). This is to create a seamless experience wherein, if you have to reboot your PC, you can now pick back up from where you left off and resume being productive. The OS app-restart feature needs at least Windows 10 (20H1) and the user has to switch on the "Restart apps" in the system Settings (subsection Accounts > Sign-in options).
@xomx Am I missing some points about this feature? |
Currently the N++ is not automatically restarted (reopened) by OS after the Windows Update restart at all. If you activate this new PR option in N++, your actual N++ session will be automatically reopened not only in the case of the mentioned WU-restart, but also after usual user-initiated one (and even after user logoff/logon sequence). I am currently using this feature e.g. in Firefox, where I usually have a lot of tabs open but for some reason I need a quick Windows restart and I do not want to bother with setting my browser to the exactly same state as it was before the restart. |
@xomx
My question is: does exist such option Restart Firefox for system app-restart to be enabled to make it work? |
I see your point. Another argument for removing this visual option is, obviously there aren't many complains from users of Firefox, Chrome & Edge (the amount of their users is huge) - otherwise, they would have considered making it as option and turn off it by default since long time ago. What do you think? |
I searched for such reports and it looks like you're right - most users probably like this feature ON as the default. But e.g. Tor Browser, which is based on Firefox and focuses on the privacy more, has this setting reversed. Anyway, if you rather like the GUI option in the Preferences removed, I propose these changes:
|
@xomx What do you think? |
Yes, that is exactly my intention now.
Ok, I will show you first my already finished solution with the config.xml file only. If you don't like it, I will also add another file trigger possibility (the mentioned |
The OS app-restart possibility is now automatically enabled in N++ at its startup unless a power-user chooses otherwise. To disable this feature in N++, one has to manually edit the config.xml file in a similar way how it is described for the changing of the cmd-line interpreter in the Preferences for Advanced Users (if this way is accepted, I will also issue a request for the npp-user-manual update...) Disabling the N++ app-restart feature (it has to be When there is not such line in the config.xml, N++ uses its default value for the In this way, the user can also adjust the registering parameters for his needs. E.g. when one uses All possible OS flags values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the setting from config.xml and use noRestartAutomatically.xml
to disable this feature.
Remove unnecessary arguments/parameters.
@xomx However,
I remain the choice of
I'm wondering why user do not need RESTART_NO_PATCH. IMO, we use HRESTART_NO_CRASH | RESTART_NO_HANG | RESTART_NO_PATCH for the classic case and it's enough. |
@donho
ok
Good point. I will change it to the requested |
@donho |
@xomx
|
@donho
|
@xomx |
BTW, remove cloud setting and copy "noRestartAutomatically.xml" into "%APPDATA%\Notepad++" works. |
This amends the previous notepad-plus-plus#14074 PR.
I see this feature in the release notes, do I need to activate it, or is this on by default? |
@HarelM |
Thanks for the quick response! |
Seems like this was off in the windows configuration, might be some company policy that turned it off. |
Fix: #9722 , #11721 , #11934 and Community forum requests like this.
Implemented as per previous discussion: #12541 (comment)
It will allow Notepad++ to be a "restartable app", like some other SW today (eg Google Chrome, Mozilla Firefox or all the MS Windows UWP apps, Office apps etc).
This is to create a seamless experience wherein, if you have to reboot your PC, you can now pick back up from where you left off and resume being productive.
The OS app-restart feature needs at least Windows 10 (20H1, builds 18963+, but it was quietly introduced earlier in the Fall Creators Update (b1709+)) and the user has to switch on the "Restart apps" in the system Settings, Win10 screenshot:
The corresponding Registry-key ON/OFF for testing:
RestartApps-Registry.zip
N++ Preferences (default is OFF):
Currently the translation xml is not updated with new strings from this PR - I will add them later if this PR and the names used are accepted.
PR has been successfully tested under various Win10 and Win11. I also run this under Win7, all ok (the feature is not accessible from there).