//#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
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?"),