]> git.lyx.org Git - features.git/commitdiff
fix bug #8208: missing \end for polyglossia-only languages at buffer end
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 23 Jun 2012 13:44:25 +0000 (15:44 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 23 Jun 2012 13:44:25 +0000 (15:44 +0200)
src/output_latex.cpp

index 3178ac599f7b3f99635621dda826bef624187cf8..c5f8306201798a5f82806f737c9e0e30c3928e87 100644 (file)
@@ -764,7 +764,9 @@ void TeXOnePar(Buffer const & buf,
                   || (runparams.isLastPar && par_language->babel() != outer_language->babel()));
 
        if (closing_rtl_ltr_environment
-               || (runparams.isLastPar && par_language->babel() != outer_language->babel())) {
+           || (runparams.isLastPar
+               && ((!use_polyglossia && par_language->babel() != outer_language->babel())
+                   || (use_polyglossia && par_language->polyglossia() != outer_language->polyglossia())))) {
                // Since \selectlanguage write the language to the aux file,
                // we need to reset the language at the end of footnote or
                // float.