commit d9af7a0fff143b23ee60ddfe8c70456462831685
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Sep 16 13:31:00 2023 +0200

    Fix change tracking glitch (#12912)
---
 src/Text.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index e8fd9d4..ef5dd26 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -3634,12 +3634,11 @@ bool doInsertInset(Cursor & cur, Text * text,
                        cutSelectionToTemp(cur, pastesel);
                        /* Move layout information inside the inset if the whole
                         * paragraph and the inset allows setting layout
-                        * FIXME: this does not work as expected when change 
tracking is on
-                        *   However, we do not really know what to do in this 
case.
                         * FIXME: figure out a good test in the environment 
case (see #12251).
                         */
                        if (cur.paragraph().layout().isCommand()
-                            && cur.paragraph().empty()
+                            && (cur.paragraph().empty()
+                                || cur.paragraph().isDeleted(0, 
cur.paragraph().size()))
                             && !inset->forcePlainLayout()) {
                                
cur.paragraph().setPlainOrDefaultLayout(bparams.documentClass());
                                move_layout = true;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to