diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 432c5ba1c..2607342b4 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2572,11 +2572,11 @@ void Notepad_plus::specialCmd(int id) } } -BOOL Notepad_plus::processIncrFindAccel(MSG *msg) const -{ - if (!::IsChild(_incrementFindDlg.getHSelf(), ::GetFocus())) - return FALSE; - return ::TranslateAccelerator(_incrementFindDlg.getHSelf(), _accelerator.getIncrFindAccTable(), msg); +BOOL Notepad_plus::processIncrFindAccel(MSG *msg) const +{ + if (!::IsChild(_incrementFindDlg.getHSelf(), ::GetFocus())) + return FALSE; + return ::TranslateAccelerator(_incrementFindDlg.getHSelf(), _accelerator.getIncrFindAccTable(), msg); } void Notepad_plus::setLanguage(LangType langType) { diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 62d7d7a81..7cb6ac250 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -514,7 +514,6 @@ private: void setDisplayFormat(formatType f); int getCmdIDFromEncoding(int encoding) const; void setUniModeText(); - void checkLangsMenu(int id) const ; void setLanguage(LangType langType); enum LangType menuID2LangType(int cmdID); diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index afaae5dd6..b089b60ea 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -269,7 +269,7 @@ bool Notepad_plus_Window::isDlgsMsg(MSG *msg) const { for (size_t i = 0, len = _notepad_plus_plus_core._hModelessDlgs.size(); i < len; ++i) { - if (_notepad_plus_plus_core.processIncrFindAccel(msg)) + if (_notepad_plus_plus_core.processIncrFindAccel(msg)) return true; if (::IsDialogMessageW(_notepad_plus_plus_core._hModelessDlgs[i], msg)) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 1cdcd3be9..9baee30b9 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -443,7 +443,6 @@ void Notepad_plus::command(int id) _pDocMap->setClosed(true); checkMenuItem(IDM_VIEW_DOC_MAP, false); _toolBar.setCheck(IDM_VIEW_DOC_MAP, false); - _pEditView->getFocus(); } else { diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp index f93efb7b0..b56a14ace 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp @@ -353,7 +353,10 @@ LRESULT DockingManager::runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l case DMM_CLOSE: { tTbData TbData = *((DockingCont*)lParam)->getDataOfActiveTb(); - return SendNotify(TbData.hClient, DMN_CLOSE); + LRESULT res = SendNotify(TbData.hClient, DMN_CLOSE); // Be sure the active item is OK with closing + if (res == 0) // Item will be closing? + ::PostMessage(_hParent, WM_ACTIVATE, WA_ACTIVE, 0); // Tell editor to take back focus + return res; } case DMM_FLOATALL: {