mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +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.beginUndoGroup();
|
||||
while(cur && iterations < max_iter) {
|
||||
Inset * ins = cur.nextInset();
|
||||
Inset * const ins = cur.nextInset();
|
||||
if (!ins)
|
||||
break;
|
||||
docstring insname = ins->layoutName();
|
||||
@ -1825,7 +1825,9 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
break;
|
||||
insname = insname.substr(0, i);
|
||||
}
|
||||
cur.forwardInset();
|
||||
// if we did not delete the inset, skip it
|
||||
if (!cur.nextInset() || cur.nextInset() == ins)
|
||||
cur.forwardInset();
|
||||
}
|
||||
cur.endUndoGroup();
|
||||
cur = savecur;
|
||||
|
Loading…
Reference in New Issue
Block a user