Add new API for getting bookmark ID

ref: https://community.notepad-plus-plus.org/topic/23541/notepad-v8-4-6-release/22?_=1664842498334
This commit is contained in:
Don Ho 2022-10-03 19:16:45 +02:00
parent 83ee8f09bf
commit 4d50692809
2 changed files with 27 additions and 14 deletions

View File

@ -544,21 +544,29 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// void* NPPN_CREATELEXER(0, const TCHAR *lexer_name)
// Returns the ILexer pointer created by Lexilla
#define VAR_NOT_RECOGNIZED 0
#define FULL_CURRENT_PATH 1
#define CURRENT_DIRECTORY 2
#define FILE_NAME 3
#define NAME_PART 4
#define EXT_PART 5
#define CURRENT_WORD 6
#define NPP_DIRECTORY 7
#define CURRENT_LINE 8
#define CURRENT_COLUMN 9
#define NPP_FULL_FILE_PATH 10
#define GETFILENAMEATCURSOR 11
#define CURRENT_LINESTR 12
#define NPPM_GETBOOKMARKID (NPPMSG + 111)
// void* NPPM_GETBOOKMARKID(0, 0)
// Returns the bookmark ID
// For RUNCOMMAND_USER
#define VAR_NOT_RECOGNIZED 0
#define FULL_CURRENT_PATH 1
#define CURRENT_DIRECTORY 2
#define FILE_NAME 3
#define NAME_PART 4
#define EXT_PART 5
#define CURRENT_WORD 6
#define NPP_DIRECTORY 7
#define CURRENT_LINE 8
#define CURRENT_COLUMN 9
#define NPP_FULL_FILE_PATH 10
#define GETFILENAMEATCURSOR 11
#define CURRENT_LINESTR 12
#define RUNCOMMAND_USER (WM_USER + 3000)
#define RUNCOMMAND_USER (WM_USER + 3000)
#define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)
#define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY)
#define NPPM_GETFILENAME (RUNCOMMAND_USER + FILE_NAME)

View File

@ -2516,6 +2516,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
return _pluginsManager.allocateMarker(static_cast<int32_t>(wParam), reinterpret_cast<int *>(lParam));
}
case NPPM_GETBOOKMARKID:
{
return MARK_BOOKMARK;
}
case NPPM_HIDETABBAR:
{
bool hide = (lParam != 0);