mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
When agreeing to wrap-around, but nothing is found, keep the cursor where it originally was.
Now this is coherent with Advanced F&R.
This commit is contained in:
parent
7081fed380
commit
b32ce2cf08
@ -125,6 +125,9 @@ void GuiSearch::wrap_dispatch(const FuncRequest & func, bool forward) {
|
||||
|
||||
BufferView * bv = const_cast<BufferView *>(bufferview());
|
||||
GuiView & lv = *const_cast<GuiView *>(&lyxview());
|
||||
|
||||
DocIterator cur_orig(bv->cursor());
|
||||
|
||||
if (!bv->cursor().result().dispatched()) {
|
||||
docstring q;
|
||||
if (forward)
|
||||
@ -148,6 +151,7 @@ void GuiSearch::wrap_dispatch(const FuncRequest & func, bool forward) {
|
||||
if (bv->cursor().result().dispatched())
|
||||
return;
|
||||
}
|
||||
bv->cursor().setCursor(cur_orig);
|
||||
lv.message(_("String not found."));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user