[LyX/master] Prevent unneeded cprotection in branches (#12378)

Juergen Spitzmueller spitz at lyx.org
Thu Oct 21 08:04:07 UTC 2021


commit b55aea6776fdcc757e6c58311c52061d89620dbf
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Oct 21 10:27:05 2021 +0200

    Prevent unneeded cprotection in branches (#12378)
---
 src/Paragraph.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index e437b65..09874a0 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1148,6 +1148,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
 		bool const cprotect = textinset
 			? textinset->hasCProtectContent(runparams.moving_arg)
 			  && !textinset->text().isMainText()
+			  && inset->lyxCode() != BRANCH_CODE
 			: false;
 		unsigned int count2 = basefont.latexWriteStartChanges(os, bparams,
 						      rp, running_font,
@@ -2823,6 +2824,7 @@ void Paragraph::latex(BufferParams const & bparams,
 				bool const cprotect = textinset
 					? textinset->hasCProtectContent(runparams.moving_arg)
 					  && !textinset->text().isMainText()
+					  && inInset().lyxCode() != BRANCH_CODE
 					: false;
 				column += current_font.latexWriteStartChanges(ots, bparams,
 									      runparams, basefont, last_font, false,


More information about the lyx-cvs mailing list