mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
Fix faulty undo recording
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.
This commit is contained in:
parent
cca68d0614
commit
82f387dabc
@ -3600,7 +3600,7 @@ bool doInsertInset(Cursor & cur, Text * text,
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user