]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Typo in metadata glyphs check.
[lyx.git] / src / lyxfind.cpp
index 0ba2acec9010a4d194352901cc12b9143416b047..2ddedcb4818bf21d37ae1c406fd7de9326990cd5 100644 (file)
 //#define ResultsDebug
 #define USE_QT_FOR_SEARCH
 #if defined(USE_QT_FOR_SEARCH)
-       #include <QtCore>       // sets QT_VERSION
-       #if (QT_VERSION >= 0x050000)
-               #include <QRegularExpression>
-               #define QTSEARCH 1
-       #else
-               #define QTSEARCH 0
-       #endif
+       #include <QRegularExpression>
+       #define QTSEARCH 1
 #else
        #define QTSEARCH 0
 #endif
@@ -338,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?"),