mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Make sure that inset-forall does not skip insets
This could happen with inset-forall Note:Note char-delete-forward when there where consecutive note insets.
This commit is contained in:
parent
e6e28f189a
commit
f7548ae2cd
@ -1809,7 +1809,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
cur.forwardInset();
|
cur.forwardInset();
|
||||||
cur.beginUndoGroup();
|
cur.beginUndoGroup();
|
||||||
while(cur && iterations < max_iter) {
|
while(cur && iterations < max_iter) {
|
||||||
Inset * ins = cur.nextInset();
|
Inset * const ins = cur.nextInset();
|
||||||
if (!ins)
|
if (!ins)
|
||||||
break;
|
break;
|
||||||
docstring insname = ins->layoutName();
|
docstring insname = ins->layoutName();
|
||||||
@ -1825,6 +1825,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
break;
|
break;
|
||||||
insname = insname.substr(0, i);
|
insname = insname.substr(0, i);
|
||||||
}
|
}
|
||||||
|
// if we did not delete the inset, skip it
|
||||||
|
if (!cur.nextInset() || cur.nextInset() == ins)
|
||||||
cur.forwardInset();
|
cur.forwardInset();
|
||||||
}
|
}
|
||||||
cur.endUndoGroup();
|
cur.endUndoGroup();
|
||||||
|
Loading…
Reference in New Issue
Block a user