mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #8370: crash when searching for next change
Cursor::backwardPos() may enter in a nested inset, while CursorSlice::backwardPos() will not.
This commit is contained in:
parent
72aee2a9c5
commit
a88e5cbf74
@ -452,13 +452,14 @@ bool findChange(BufferView * bv, bool next)
|
||||
bv->cursor().setCursor(cur);
|
||||
bv->cursor().resetAnchor();
|
||||
|
||||
CursorSlice & tip = cur.top();
|
||||
|
||||
if (!next)
|
||||
// take a step into the change
|
||||
cur.backwardPos();
|
||||
tip.backwardPos();
|
||||
|
||||
Change orig_change = cur.paragraph().lookupChange(cur.pos());
|
||||
Change orig_change = tip.paragraph().lookupChange(tip.pos());
|
||||
|
||||
CursorSlice & tip = cur.top();
|
||||
if (next) {
|
||||
for (; !tip.at_end(); tip.forwardPos()) {
|
||||
Change change = tip.paragraph().lookupChange(tip.pos());
|
||||
|
Loading…
Reference in New Issue
Block a user