Make sure that Cursor::setCurrentFont sets LaTeX language in ERT&friends

Fix issue when language is set to document language instead of
latex_language in ERT and pass thru layouts.

To trigger the issue
1/ select all in a ERT inset
2/ type "abc"
3/ look at code in code preview pane

==> result: the "a" is in document language, the "bc" in LaTeX language
(as should be)
This commit is contained in:
Jean-Marc Lasgouttes 2020-11-10 13:47:53 +01:00
parent 23d0e44bd6
commit 411333fa95

View File

@ -2457,6 +2457,12 @@ void Cursor::setCurrentFont()
real_current_font.setLanguage(lang);
real_current_font.fontInfo().setNumber(FONT_OFF);
}
// No language in pass thru situations
if (cs.paragraph().isPassThru()) {
current_font.setLanguage(latex_language);
real_current_font.setLanguage(latex_language);
}
}