From 9c66ff9c71e12a4c18c7b02e8c221002af27560d Mon Sep 17 00:00:00 2001 From: Scott Sumner <30118311+sasumner@users.noreply.github.com> Date: Mon, 12 Apr 2021 17:04:26 -0400 Subject: [PATCH] Fix Copy command in Search result is available as there's no selection Disable Search Results Copy (verbatim) command if no selected text. Fix #9757, close #9764 --- PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 782d6512b..bd9ba3b96 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -4235,6 +4235,9 @@ INT_PTR CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) scintillaContextmenu.create(_hSelf, tmp); + bool hasSomeSelectedText = _scintView.getSelectedTextCount() > 0; + scintillaContextmenu.enableItem(NPPM_INTERNAL_SCINTILLAFINDERCOPYVERBATIM, hasSomeSelectedText); + scintillaContextmenu.enableItem(NPPM_INTERNAL_SCINTILLAFINDERCLEARALL, !_canBeVolatiled); scintillaContextmenu.enableItem(NPPM_INTERNAL_SCINTILLAFINDERPURGE, !_canBeVolatiled);