Le 02/07/2024 à 18:01, Scott Kostyshak a écrit :
To reproduce:

1. Fresh build on current master.
2. Open User Guide.
3. Make sure that editing is enabled, and turn off change tracking.
4. Scroll to the end.
5. Select multiple bib items.
6. Click on the yellow note.
7. Do Undo with ctrl + z.

I get the attached backtrace. Can anyone else reproduce?

If I don't turn off change tracking, different strange behavior occurs.

I cannot reproduce, but the following patch makes sense. Does it work?

JMarc


diff --git a/src/Text.cpp b/src/Text.cpp
index 2a5ff9f0b8..d56cd10268 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -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);
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to