[LyX/master] Fix font tracking at fontswitch_insets

Juergen Spitzmueller spitz at lyx.org
Sat Aug 6 14:44:50 UTC 2022


commit 8ac177f656da9db2021d72fb4b615b7ef15de2d1
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Aug 6 17:29:40 2022 +0200

    Fix font tracking at fontswitch_insets
    
    (hopefully)
---
 src/Paragraph.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index f2709c8..3cf5398 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2908,9 +2908,14 @@ void Paragraph::latex(BufferParams const & bparams,
 					column += Changes::latexMarkChange(os, bparams,
 						Change(Change::UNCHANGED), change, rp);
 				}
-			} else {
+			} else {// if fontswitch_inset
+				if (current_font != running_font || !langClosed)
+					// font is still open in fontswitch_insets if we have
+					// a non-lang font difference or if the language
+					// is the only difference but has not been forcedly
+					// closed meanwhile
+					open_font = true;
 				running_font = current_font;
-				open_font &= !langClosed;
 			}
 		}
 


More information about the lyx-cvs mailing list