diff --git a/.github/actions/spelling/expect/expect.txt b/.github/actions/spelling/expect/expect.txt index 1a189277aef..377c2f03644 100644 --- a/.github/actions/spelling/expect/expect.txt +++ b/.github/actions/spelling/expect/expect.txt @@ -609,6 +609,7 @@ FILTERONPASTE FINDCASE FINDDLG FINDDOWN +FINDREGEX FINDSTRINGEXACT FINDUP FIter diff --git a/src/host/res.rc b/src/host/res.rc index 6f566147e33..d77ade8c883 100644 --- a/src/host/res.rc +++ b/src/host/res.rc @@ -83,6 +83,7 @@ BEGIN EDITTEXT ID_CONSOLE_FINDSTR, 47, 7, 128, 12, WS_GROUP | WS_TABSTOP | ES_AUTOHSCROLL AUTOCHECKBOX "Match &case", ID_CONSOLE_FINDCASE, 4, 42, 64, 12 + AUTOCHECKBOX "Regula&r expression", ID_CONSOLE_FINDREGEX, 4, 28, 96, 12 GROUPBOX "Direction", -1, 107, 26, 68, 28, WS_GROUP AUTORADIOBUTTON "&Up", ID_CONSOLE_FINDUP, 111, 38, 25, 12, WS_GROUP diff --git a/src/host/resource.h b/src/host/resource.h index 9ea8cf549b6..053c34704a2 100644 --- a/src/host/resource.h +++ b/src/host/resource.h @@ -49,5 +49,6 @@ Author(s): #define ID_CONSOLE_FINDCASE 602 #define ID_CONSOLE_FINDUP 603 #define ID_CONSOLE_FINDDOWN 604 +#define ID_CONSOLE_FINDREGEX 605 // clang-format on diff --git a/src/interactivity/win32/find.cpp b/src/interactivity/win32/find.cpp index 5848705e21e..033918e3ae5 100644 --- a/src/interactivity/win32/find.cpp +++ b/src/interactivity/win32/find.cpp @@ -33,6 +33,7 @@ INT_PTR CALLBACK FindDialogProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM l SetWindowLongPtrW(hWnd, DWLP_USER, lParam); CheckRadioButton(hWnd, ID_CONSOLE_FINDUP, ID_CONSOLE_FINDDOWN, (reverse ? ID_CONSOLE_FINDUP : ID_CONSOLE_FINDDOWN)); CheckDlgButton(hWnd, ID_CONSOLE_FINDCASE, WI_IsFlagClear(flags, SearchFlag::CaseInsensitive)); + CheckDlgButton(hWnd, ID_CONSOLE_FINDREGEX, WI_IsFlagSet(flags, SearchFlag::RegularExpression)); SetDlgItemTextW(hWnd, ID_CONSOLE_FINDSTR, lastFindString.c_str()); return TRUE; case WM_COMMAND: @@ -47,6 +48,7 @@ INT_PTR CALLBACK FindDialogProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM l lastFindString.resize(length); WI_UpdateFlag(flags, SearchFlag::CaseInsensitive, IsDlgButtonChecked(hWnd, ID_CONSOLE_FINDCASE) == 0); + WI_UpdateFlag(flags, SearchFlag::RegularExpression, IsDlgButtonChecked(hWnd, ID_CONSOLE_FINDREGEX) != 0); reverse = IsDlgButtonChecked(hWnd, ID_CONSOLE_FINDDOWN) == 0; LockConsole(); diff --git a/src/interactivity/win32/resource.h b/src/interactivity/win32/resource.h index 9b82b787ec0..bb871e2b52f 100644 --- a/src/interactivity/win32/resource.h +++ b/src/interactivity/win32/resource.h @@ -46,5 +46,6 @@ Author(s): #define ID_CONSOLE_FINDCASE 602 #define ID_CONSOLE_FINDUP 603 #define ID_CONSOLE_FINDDOWN 604 +#define ID_CONSOLE_FINDREGEX 605 // clang-format on