mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
Fix of #4388 also for non advanced find.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37047 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e82fd0c4a3
commit
fa0e638b95
@ -270,6 +270,13 @@ pair<bool, int> replaceOne(BufferView * bv, docstring searchstr,
|
||||
return pair<bool, int>(false, 0);
|
||||
|
||||
cap::replaceSelectionWithString(cur, replacestr, forward);
|
||||
if (forward) {
|
||||
cur.pos() += replacestr.length();
|
||||
LASSERT(cur.pos() <= cur.lastpos(), /* */);
|
||||
} else {
|
||||
cur.pos() -= replacestr.length();
|
||||
LASSERT(cur.pos() >= 0, /* */);
|
||||
}
|
||||
findOne(bv, searchstr, case_sens, whole, forward, false);
|
||||
|
||||
return pair<bool, int>(true, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user