mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 18:24:48 +00:00
Fix of bug ##6334 - now if you search for something not in the doc, it wraps around only once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32558 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d5b329502b
commit
ad0060454d
@ -934,7 +934,7 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv const & match)
|
||||
{
|
||||
if (!cur)
|
||||
return 0;
|
||||
int wrap_answer;
|
||||
int wrap_answer = -1;
|
||||
do {
|
||||
while (cur && !match(cur, -1, false)) {
|
||||
if (cur.pit() < cur.lastpit())
|
||||
@ -947,12 +947,14 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv const & match)
|
||||
if (match(cur))
|
||||
return findAdvFinalize(cur, match);
|
||||
}
|
||||
if (wrap_answer != -1)
|
||||
break;
|
||||
wrap_answer = frontend::Alert::prompt(
|
||||
_("Wrap search?"),
|
||||
_("End of document reached while searching forward.\n"
|
||||
"\n"
|
||||
"Continue searching from beginning?"),
|
||||
0, 1, _("&Yes"), _("&No"));
|
||||
0, 1, _("&Yes"), _("&No"));
|
||||
cur.clear();
|
||||
cur.push_back(CursorSlice(match.buf.inset()));
|
||||
} while (wrap_answer == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user