commit 010d2c63be63ae2f402fec8810992b8d79fdca42
Author: Juergen Spitzmueller <[email protected]>
Date: Tue Sep 8 09:31:55 2026 +0200
Fix language setting after switching from PassThru paragraph (#13233)
Assisted-By: Claude Sonnet 5
(cherry picked from commit 65131c7b4d4b52902f44269c699ba670e2656357)
---
src/Text.cpp | 5 +++++
status.25x | 2 ++
2 files changed, 7 insertions(+)
diff --git a/src/Text.cpp b/src/Text.cpp
index a262821350..282fa4e5b1 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -2610,6 +2610,7 @@ void Text::setLayout(pit_type start, pit_type end,
for (pit_type pit = start; pit != end; ++pit) {
Paragraph & par = pars_[pit];
+ bool const was_pass_thru = par.isPassThru();
// Is this a separating paragraph? If so,
// this needs to be standard layout
bool const is_separator = par.size() == 1
@@ -2617,6 +2618,10 @@ void Text::setLayout(pit_type start, pit_type end,
par.applyLayout(is_separator ?
bp.documentClass().defaultLayout() : lyxlayout);
if (lyxlayout.margintype == MARGIN_MANUAL)
par.setLabelWidthString(par.expandLabel(lyxlayout, bp));
+ // If we switch from a pass-thru to a non-pass-thru paragraph,
+ // reset the language from latex to doc language (#13233)
+ if (was_pass_thru && !par.isPassThru())
+ par.changeLanguage(bp, latex_language, bp.language);
}
deleteEmptyParagraphMechanism(start, end - 1, bp.track_changes);
diff --git a/status.25x b/status.25x
index 7fd5294222..5af9a952ae 100644
--- a/status.25x
+++ b/status.25x
@@ -41,6 +41,8 @@ What's new
- Fix varwidth table cells with multirows.
+- Fix language setting after switching from PassThru paragraph (bug 13233).
+
* USER INTERFACE
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs