From f850a9ff32134033bd212afe76d9751a9105b7f1 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 21 Feb 2024 04:33:33 +0100 Subject: [PATCH] Rename notification --- PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h | 6 +++--- PowerEditor/src/NppBigSwitch.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index 40590c4c1d78..a59e2ada553a 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -1173,9 +1173,9 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 }; //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = BufferID; //where pluginMessage is pointer of type wchar_t - #define NPPN_DOCMODIFIEDBYREPLACEALL (NPPN_FIRST + 29) // To notify plugins that the current document is just modified by Replace All action. For solving the performance issue (from v8.6.4), - // Notepad++ doesn't trigger SCN_MODIFIED & other Scitilla notifications during Replace All action anymore. - // Plugin devs should monitor NPPN_DOCMODIFIEDBYREPLACEALL instead. This notification is implemented in Notepad++ v8.6.5. + #define NPPN_GLOBALMODIFIED (NPPN_FIRST + 29) // To notify plugins that the current document is just modified by Replace All action. For solving the performance issue (from v8.6.4), + // Notepad++ doesn't trigger SCN_MODIFIED & other Scitilla notifications during Replace All action anymore. + // Plugin devs should monitor NPPN_GLOBALMODIFIED instead. This notification is implemented in Notepad++ v8.6.5. //scnNotification->nmhdr.code = NPPN_DOCMODIFIEDBYREPLACEALL; //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = 0; diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 9d90add4bab7..3f3206f6739a 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -3519,7 +3519,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa case NPPM_INTERNAL_DOCMODIFIEDBYREPLACEALL: { SCNotification scnN{}; - scnN.nmhdr.code = NPPN_DOCMODIFIEDBYREPLACEALL; + scnN.nmhdr.code = NPPN_GLOBALMODIFIED; scnN.nmhdr.hwndFrom = hwnd; scnN.nmhdr.idFrom = 0; _pluginsManager.notify(&scnN);