mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Just refactoring patch 5e5115c3
in simpler terms.
This commit is contained in:
parent
5e5115c376
commit
6ea1479252
@ -1446,13 +1446,8 @@ 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);
|
||||
}
|
||||
if (length > 0)
|
||||
bv->putSelectionAt(bv->cursor().selectionBegin(), length, !opt.forward);
|
||||
findAdvReplace(bv, opt, matchAdv);
|
||||
cur = bv->cursor();
|
||||
if (opt.forward)
|
||||
|
Loading…
Reference in New Issue
Block a user