[LyX/master] Check whether we have a selection before issuing warning (#12655)
Juergen Spitzmueller
spitz at lyx.org
Mon Feb 6 09:47:19 UTC 2023
commit fb37682d7454f2679d01235ad51912fe11d6caa6
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Feb 6 11:47:14 2023 +0100
Check whether we have a selection before issuing warning (#12655)
---
src/lyxfind.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 39543fa..2ddedcb 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -333,7 +333,7 @@ bool findOne(BufferView * bv, docstring const & searchstr,
if (match_len > 0)
bv->putSelectionAt(cur, match_len, !forward);
- else if (onlysel) {
+ else if (onlysel && bv->cursor().selection()) {
docstring q = _("The search string was not found within the selection.\n"
"Continue search outside?");
int search_answer = frontend::Alert::prompt(_("Search outside selection?"),
More information about the lyx-cvs
mailing list