void FindAndReplaceWidget::findAndReplaceScope(FindAndReplaceOptions & opt)
{
+ view_.setBusy(true);
int wrap_answer = -1;
ostringstream oss;
oss << opt;
LYXERR(Debug::FIND, "dispatched");
if (bv->cursor().result().dispatched()) {
// New match found and selected (old selection replaced if needed)
+ view_.setBusy(false);
return;
}
if (wrap_answer != -1)
break;
docstring q = getQuestionString(opt);
+ view_.setBusy(false);
wrap_answer = frontend::Alert::prompt(
_("Wrap search?"), q,
0, 1, _("&Yes"), _("&No"));
+ view_.setBusy(true);
if (wrap_answer == 1)
break;
}
if (cur_orig.pos() > cur_orig.lastpos())
cur_orig.pos() = cur_orig.lastpos();
bv->cursor().setCursor(cur_orig);
+ view_.setBusy(false);
}
FindAndReplaceOptions opt(searchString, casesensitive, matchword,
!backwards, expandmacros, ignoreformat,
regexp, replaceString, keep_case, scope);
- view_.setBusy(true);
findAndReplaceScope(opt);
- view_.setBusy(false);
}