[LyX/master] Fix bug #11716

Enrico Forestieri forenr at lyx.org
Sun Jan 12 17:22:32 UTC 2020


commit 45f8254cbdebb6a1b6185e0ac1d544e50c7f62ad
Author: Enrico Forestieri <forenr at lyx.org>
Date:   Sun Jan 12 18:35:15 2020 +0100

    Fix bug #11716
    
    Close \lyx*displayobjdeleted so that the correct macro is used for
    the following deleted material.
---
 src/Paragraph.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 389b436..dab004e 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)


More information about the lyx-cvs mailing list