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
This commit is contained in:
Scott Sumner 2021-04-12 17:04:26 -04:00 committed by Don HO
parent 15b7a26c87
commit 9c66ff9c71
1 changed files with 3 additions and 0 deletions

View File

@ -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);