mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ fix: Menu "Mark Occurrences" whole word matching: add check indicator if one of word matching options (selected / current) is used
This commit is contained in:
parent
4e28d3e6d3
commit
08b10b0729
@ -155,8 +155,12 @@ LRESULT SendWMSize(HWND);
|
||||
|
||||
BOOL IsCmdEnabled(HWND, UINT);
|
||||
|
||||
#define EnableCmd(hmenu,id,b) EnableMenuItem(hmenu,id,(b)?MF_BYCOMMAND|MF_ENABLED:MF_BYCOMMAND|MF_GRAYED)
|
||||
#define CheckCmd(hmenu,id,b) CheckMenuItem(hmenu,id,(b)?MF_BYCOMMAND|MF_CHECKED:MF_BYCOMMAND|MF_UNCHECKED)
|
||||
#define EnableCmd(hmenu,id,b) EnableMenuItem((hmenu),(id),(b)?MF_BYCOMMAND|MF_ENABLED:MF_BYCOMMAND|MF_GRAYED)
|
||||
#define CheckCmd(hmenu,id,b) CheckMenuItem((hmenu),(id),(b)?MF_BYCOMMAND|MF_CHECKED:MF_BYCOMMAND|MF_UNCHECKED)
|
||||
|
||||
#define EnableCmdPos(hmenu,pos,b) EnableMenuItem((hmenu),(pos),(b)?MF_BYPOSITION|MF_ENABLED:MF_BYPOSITION|MF_GRAYED)
|
||||
#define CheckCmdPos(hmenu,pos,b) CheckMenuItem((hmenu),(pos),(b)?MF_BYPOSITION|MF_CHECKED:MF_BYPOSITION|MF_UNCHECKED)
|
||||
|
||||
|
||||
#define DialogEnableWindow(hdlg, id, b) { HWND hctrl = GetDlgItem((hdlg),(id)); if (!(b)) { \
|
||||
if (GetFocus() == hctrl) { SendMessage((hdlg), WM_NEXTDLGCTL, 0, FALSE); } }; EnableWindow(hctrl, (b)); }
|
||||
|
||||
@ -4330,6 +4330,12 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
if (bMarkOccurrencesMatchWords) {
|
||||
bMarkOccurrencesCurrentWord = FALSE;
|
||||
}
|
||||
if (bMarkOccurrencesMatchWords || bMarkOccurrencesCurrentWord) {
|
||||
CheckCmdPos(GetSubMenu(GetSubMenu(GetMenu(g_hwndMain), 2), 17), 5, TRUE);
|
||||
}
|
||||
else {
|
||||
CheckCmdPos(GetSubMenu(GetSubMenu(GetMenu(g_hwndMain), 2), 17), 5, FALSE);
|
||||
}
|
||||
EditClearAllMarks(g_hwndEdit, 0, -1);
|
||||
MarkAllOccurrences(0);
|
||||
break;
|
||||
@ -4339,6 +4345,12 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
if (bMarkOccurrencesCurrentWord) {
|
||||
bMarkOccurrencesMatchWords = FALSE;
|
||||
}
|
||||
if (bMarkOccurrencesMatchWords || bMarkOccurrencesCurrentWord) {
|
||||
CheckCmdPos(GetSubMenu(GetSubMenu(GetMenu(g_hwndMain), 2), 17), 5, TRUE);
|
||||
}
|
||||
else {
|
||||
CheckCmdPos(GetSubMenu(GetSubMenu(GetMenu(g_hwndMain), 2), 17), 5, FALSE);
|
||||
}
|
||||
EditClearAllMarks(g_hwndEdit, 0, -1);
|
||||
MarkAllOccurrences(0);
|
||||
break;
|
||||
|
||||
@ -300,7 +300,7 @@ BEGIN
|
||||
MENUITEM "Hyperlink Hotspots\tCtrl+Alt+H", IDM_VIEW_HYPERLINKHOTSPOTS
|
||||
MENUITEM "Visual &Brace Matching\tCtrl+Shift+V", IDM_VIEW_MATCHBRACES
|
||||
MENUITEM "Highlight C&urrent Line\tCtrl+Shift+I", IDM_VIEW_HILITECURRENTLINE
|
||||
POPUP "Mar&k Occurrences"
|
||||
POPUP "Mark &Occurrences"
|
||||
BEGIN
|
||||
MENUITEM "&Active", IDM_VIEW_MARKOCCUR_ONOFF
|
||||
MENUITEM SEPARATOR
|
||||
@ -310,7 +310,7 @@ BEGIN
|
||||
POPUP "Match &Whole Word Only"
|
||||
BEGIN
|
||||
MENUITEM "Match &Selected Word", IDM_VIEW_MARKOCCUR_WORD
|
||||
MENUITEM "Match Cu&rrent Word", IDM_VIEW_MARKOCCUR_CURRENT
|
||||
MENUITEM "Match &Current Word", IDM_VIEW_MARKOCCUR_CURRENT
|
||||
END
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
// //////////////////////////////////////////////////////////
|
||||
#define VERSION_MAJOR 3
|
||||
#define VERSION_MINOR 18
|
||||
#define VERSION_REV 105
|
||||
#define VERSION_BUILD 802
|
||||
#define VERSION_REV 106
|
||||
#define VERSION_BUILD 808
|
||||
#define SCINTILLA_VER 402
|
||||
#define ONIGMO_REGEX_VER 6.1.3
|
||||
|
||||
Loading…
Reference in New Issue
Block a user