From ce0012ab5c01f5f55e9da7d248a23234f15927cf Mon Sep 17 00:00:00 2001 From: Pavel Nedev Date: Tue, 19 Jan 2021 15:07:40 +0200 Subject: [PATCH] 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 --- PowerEditor/src/NppIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index e3ace2d2e..f83352b50 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -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); }