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.
(cherry picked from commit
82f387dabc2b18de6a9917192f4304e92bff8bc1)
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);
* INTERNALS
+- Fix possible crash in undo code after inserting note inset over a multi-paragraph
+ selection.
* DOCUMENTATION AND LOCALIZATION