mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NOTEPAD] Don't reset Find/Replace if lpstrFindWhat is set (#5104)
We don't want to reset the status of the checkboxes even if the Find/Replace dialog was closed. If lpstrFindWhat is set, do not reset the Find/Replace settings at DIALOG_SearchDialog. CORE-18837
This commit is contained in:
parent
8c7233e015
commit
f8c7bd6898
1 changed files with 11 additions and 9 deletions
|
@ -1048,15 +1048,17 @@ static VOID DIALOG_SearchDialog(FINDPROC pfnProc)
|
|||
return;
|
||||
}
|
||||
|
||||
ZeroMemory(&Globals.find, sizeof(Globals.find));
|
||||
Globals.find.lStructSize = sizeof(Globals.find);
|
||||
Globals.find.hwndOwner = Globals.hMainWnd;
|
||||
Globals.find.hInstance = Globals.hInstance;
|
||||
Globals.find.lpstrFindWhat = Globals.szFindText;
|
||||
Globals.find.wFindWhatLen = ARRAY_SIZE(Globals.szFindText);
|
||||
Globals.find.lpstrReplaceWith = Globals.szReplaceText;
|
||||
Globals.find.wReplaceWithLen = ARRAY_SIZE(Globals.szReplaceText);
|
||||
Globals.find.Flags = FR_DOWN;
|
||||
if (!Globals.find.lpstrFindWhat)
|
||||
{
|
||||
ZeroMemory(&Globals.find, sizeof(Globals.find));
|
||||
Globals.find.lStructSize = sizeof(Globals.find);
|
||||
Globals.find.hwndOwner = Globals.hMainWnd;
|
||||
Globals.find.lpstrFindWhat = Globals.szFindText;
|
||||
Globals.find.wFindWhatLen = ARRAY_SIZE(Globals.szFindText);
|
||||
Globals.find.lpstrReplaceWith = Globals.szReplaceText;
|
||||
Globals.find.wReplaceWithLen = ARRAY_SIZE(Globals.szReplaceText);
|
||||
Globals.find.Flags = FR_DOWN;
|
||||
}
|
||||
|
||||
/* We only need to create the modal FindReplace dialog which will */
|
||||
/* notify us of incoming events using hMainWnd Window Messages */
|
||||
|
|
Loading…
Reference in a new issue