[LyX/master] Do not attempt to close language twice
Juergen Spitzmueller
spitz at lyx.org
Fri Aug 21 08:41:47 UTC 2020
commit 448e5efab42f75e48d01550f9781318425275f15
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Fri Aug 21 11:07:22 2020 +0200
Do not attempt to close language twice
---
src/Paragraph.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 8ef7c20..d1c7fe9 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2615,6 +2615,7 @@ void Paragraph::latex(BufferParams const & bparams,
}
// Do we need to close the previous font?
+ bool langClosed = false;
if (open_font &&
((current_font != running_font
|| current_font.language() != running_font.language())
@@ -2650,6 +2651,7 @@ void Paragraph::latex(BufferParams const & bparams,
}
running_font = basefont;
open_font = false;
+ langClosed = true;
}
// if necessary, close language environment before opening CJK
@@ -2749,7 +2751,7 @@ void Paragraph::latex(BufferParams const & bparams,
}
} else {
running_font = current_font;
- open_font = true;
+ open_font = !langClosed;
}
}
More information about the lyx-cvs
mailing list