The recordUndo() call is very wrong, since we may be inserting over a
selection covering several paragraphs (undo itself works at paragraph
granularity).
recordUndoSelection() is the right operation in this case. It is
equivalent to recordUndo() when there is no selection.
if (InsetCollapsible * ci = inset->asInsetCollapsible())
ci->setButtonLabel();
- cur.recordUndo();
+ cur.recordUndoSelection();
if (cmd.action() == LFUN_ARGUMENT_INSERT) {
bool cotextinsert = false;
InsetArgument * const ia = static_cast<InsetArgument *>(inset);