Fix regression of F3 & Shift-F3 in Incremental Search

The regression was introduced by:
ac871cacd4

Fix #14503, close #14504
pull/14511/head
Alan Kilborn 2023-12-18 18:10:46 -05:00 committed by Don Ho
parent 4e2903a274
commit 7419770d2e
2 changed files with 6 additions and 11 deletions

View File

@ -421,14 +421,14 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin
bool Notepad_plus_Window::isDlgsMsg(MSG *msg) const
{
if (_notepad_plus_plus_core.processIncrFindAccel(msg))
return true;
if (_notepad_plus_plus_core.processFindAccel(msg))
return true;
for (size_t i = 0, len = _notepad_plus_plus_core._hModelessDlgs.size(); i < len; ++i)
{
if (_notepad_plus_plus_core.processIncrFindAccel(msg))
return true;
if (_notepad_plus_plus_core.processFindAccel(msg))
return true;
if (::IsDialogMessageW(_notepad_plus_plus_core._hModelessDlgs[i], msg))
return true;
}

View File

@ -615,7 +615,6 @@ void Accelerator::updateShortcuts()
if (_hIncFindAccTab)
::DestroyAcceleratorTable(_hIncFindAccTab);
size_t nb = incrFindAcc.size();
ACCEL *tmpIncrFindAccelArray = new ACCEL[nb];
for (i = 0; i < nb; ++i)
@ -625,10 +624,6 @@ void Accelerator::updateShortcuts()
_hIncFindAccTab = ::CreateAcceleratorTable(tmpIncrFindAccelArray, static_cast<int32_t>(nb));
delete [] tmpIncrFindAccelArray;
if (_hIncFindAccTab)
::DestroyAcceleratorTable(_hIncFindAccTab);
if (_hFindAccTab)
::DestroyAcceleratorTable(_hFindAccTab);
size_t nbFindReplaceAcc = findReplaceAcc.size();