From: Juergen Spitzmueller Date: Mon, 6 Feb 2023 10:47:14 +0000 (+0100) Subject: Check whether we have a selection before issuing warning (#12655) X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=fb37682d7454f2679d01235ad51912fe11d6caa6;p=features.git Check whether we have a selection before issuing warning (#12655) --- diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 39543fa5ad..2ddedcb481 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?"),