mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +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
d98004e1ac
commit
d4b960c5f4
@ -447,13 +447,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());
|
||||
|
@ -120,6 +120,8 @@ What's new
|
||||
|
||||
- Fix crash when clicking on a completion in math mode (bug 8296).
|
||||
|
||||
- Fix assertion when searching for next change (bug 8370).
|
||||
|
||||
- Fix regression in which clicking in the main work area always resets
|
||||
the selected format in View -> Source (bug 8411).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user