From d7ddb6ea3a38646fad61ef4e74add63c9d6eeed2 Mon Sep 17 00:00:00 2001 From: Alan Kilborn <77065706+alankilborn@users.noreply.github.com> Date: Sun, 12 Jan 2025 20:58:06 -0500 Subject: [PATCH] Enhance UX in "Find in file" action while Directory field is empty Move the input focus to Directory edit control if Directory field is empty while launching Find in files search. Fix #16051, close #16057 --- PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index db26aaaa2..0caf3dfa4 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -2244,6 +2244,11 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA findAllIn(FILES_IN_DIR); nppParamInst._isFindReplacing = false; } + else + { + // move input focus to "Directory:" edit control + ::SendMessage(_hSelf, WM_NEXTDLGCTL, reinterpret_cast(::GetDlgItem(_hSelf, IDD_FINDINFILES_DIR_COMBO)), TRUE); + } } else if (_currentStatus == FINDINPROJECTS_DLG) { @@ -2296,6 +2301,11 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA nppParamInst._isFindReplacing = false; } } + else + { + // move input focus to "Directory:" edit control + ::SendMessage(_hSelf, WM_NEXTDLGCTL, reinterpret_cast(::GetDlgItem(_hSelf, IDD_FINDINFILES_DIR_COMBO)), TRUE); + } } return TRUE;