From 1dad7c7e7f3357fcffbdd79051ac41805423fdae Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 29 Jul 2021 17:46:17 +0200 Subject: [PATCH] Increase macro, user command and plugin command number capacity Macros: 200 -> 499 User cmds: 200 -> 499 Plugin cmds: 500 -> 999 Fix #10263 --- .../MISC/PluginsManager/Notepad_plus_msgs.h | 3 +- PowerEditor/src/resource.h | 57 +++++++++++++++---- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index ba5d801ad..f41fc668c 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -346,7 +346,8 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 }; #define NPPM_ALLOCATEMARKER (NPPMSG + 82) // BOOL NPPM_ALLOCATEMARKER(int numberRequested, int* startNumber) // sets startNumber to the initial command ID if successful - // Allocates a marker number to a plugin + // Allocates a marker number to a plugin: if a plugin need to add a marker on Notepad++'s Scintilla marker margin, + // it has to use this message to get marker number, in order to prevent from the conflict with the other plugins. // Returns: TRUE if successful, FALSE otherwise. startNumber will also be set to 0 if unsuccessful #define NPPM_GETLANGUAGENAME (NPPMSG + 83) diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index c5ee93a00..e6771dbf3 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -365,24 +365,57 @@ #define IDR_ASCIIPANEL_ICO2 1562 #define IDR_ASCIIPANEL_ICO_DM 1563 -#define ID_MACRO 20000 -#define ID_MACRO_LIMIT 20200 +#define ID_MACRO 20000 +// O . +// C . +// C . +// U . +// P . +// I . +// E . +// D . +#define ID_MACRO_LIMIT 20499 -#define ID_USER_CMD 21000 -#define ID_USER_CMD_LIMIT 21200 -#define ID_PLUGINS_CMD 22000 -#define ID_PLUGINS_CMD_LIMIT 22500 +#define ID_USER_CMD 21000 +// O . +// C . +// C . +// U . +// P . +// I . +// E . +// D . +#define ID_USER_CMD_LIMIT 21499 + + +#define ID_PLUGINS_CMD 22000 +// O . +// C . +// C . +// U . +// P . +// I . +// E . +// D . +#define ID_PLUGINS_CMD_LIMIT 22999 + + +#define ID_PLUGINS_CMD_DYNAMIC 23000 +// O . +// C . +// C . +// U . +// P . +// I . +// E . +// D . +#define ID_PLUGINS_CMD_DYNAMIC_LIMIT 24999 -#define ID_PLUGINS_CMD_DYNAMIC 23000 -#define ID_PLUGINS_CMD_DYNAMIC_LIMIT 24999 #define MARKER_PLUGINS 3 #define MARKER_PLUGINS_LIMIT 19 -/*UNLOAD -#define ID_PLUGINS_REMOVING 22501 -#define ID_PLUGINS_REMOVING_END 22600 -*/ + //#define IDM 40000