Fix possible empty snapshot session on Windows reboot/shutdown

Save snapshot session immediately when needed (without incuring delay by using ::PostMessage).

Fix #7839 and latest user reported problems in #6133.
Close #9427
This commit is contained in:
Pavel Nedev 2021-01-19 15:07:40 +02:00 committed by Don HO
parent 3bf17ec697
commit ce0012ab5c
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -2344,5 +2344,5 @@ void Notepad_plus::saveSession(const Session & session)
void Notepad_plus::saveCurrentSession()
{
::PostMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_SAVECURRENTSESSION, 0, 0);
::SendMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_SAVECURRENTSESSION, 0, 0);
}