mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fixed issue #8543 also for advanced search (cursor moved at proper end of selection before starting Find Advanced operation).
This commit is contained in:
parent
6d4cde435d
commit
5e5115c376
@ -1445,6 +1445,14 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt)
|
||||
|
||||
try {
|
||||
MatchStringAdv matchAdv(bv->buffer(), opt);
|
||||
int length = bv->cursor().selectionEnd().pos() - bv->cursor().selectionBegin().pos();
|
||||
if (length > 0) {
|
||||
LYXERR(Debug::FIND, "Putting selection at cur=" << cur << " with length: " << length << " and direction: " << !opt.forward);
|
||||
if (opt.forward)
|
||||
bv->putSelectionAt(bv->cursor().selectionBegin(), length, false);
|
||||
else
|
||||
bv->putSelectionAt(bv->cursor().selectionBegin(), length, true);
|
||||
}
|
||||
findAdvReplace(bv, opt, matchAdv);
|
||||
cur = bv->cursor();
|
||||
if (opt.forward)
|
||||
|
Loading…
Reference in New Issue
Block a user