]> git.lyx.org Git - features.git/commitdiff
Fix bug #11716
authorEnrico Forestieri <forenr@lyx.org>
Sun, 12 Jan 2020 17:35:15 +0000 (18:35 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:50 +0000 (15:48 +0200)
Close \lyx*displayobjdeleted so that the correct macro is used for
the following deleted material.

src/Paragraph.cpp

index 389b43699e6365812c44abae2ec30d92ac3fe8ef..dab004ee3904e3d42ef4e14d36aa4d8201348cd7 100644 (file)
@@ -2732,6 +2732,16 @@ void Paragraph::latex(BufferParams const & bparams,
                                                runningChange, style, i, column);
                                if (incremented)
                                        --parInline;
+
+                               if (runparams.ctObject == OutputParams::CT_DISPLAYOBJECT
+                                   || runparams.ctObject == OutputParams::CT_UDISPLAYOBJECT) {
+                                       // Close \lyx*deleted and force its
+                                       // reopening (if needed)
+                                       os << '}';
+                                       column++;
+                                       runningChange = Change(Change::UNCHANGED);
+                                       runparams.ctObject = OutputParams::CT_NORMAL;
+                               }
                        }
                } else if (i >= start_pos && (end_pos == -1 || i < end_pos)) {
                        if (!bparams.useNonTeXFonts)