From: Enrico Forestieri Date: Sun, 12 Jan 2020 17:35:15 +0000 (+0100) Subject: Fix bug #11716 X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1337 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=45f8254cbdebb6a1b6185e0ac1d544e50c7f62ad;p=lyx.git Fix bug #11716 Close \lyx*displayobjdeleted so that the correct macro is used for the following deleted material. --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 389b43699e..dab004ee39 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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)