]> git.lyx.org Git - features.git/commitdiff
Amend 2d4ac90fd20eac once more
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 10 Sep 2018 10:29:22 +0000 (12:29 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 26 Sep 2018 15:02:18 +0000 (17:02 +0200)
Only use local switch in RTL environment.

(cherry picked from commit e158d661b924102acb87a3c92f800a463fdca408)

src/output_latex.cpp
status.23x

index 1cdb6ddc4aee5e9b6915d97a535b174106069752..bdc7cb28efd40c513460f75581b327debaab38e2 100644 (file)
@@ -835,11 +835,14 @@ void TeXOnePar(Buffer const & buf,
        // Also, if an RTL language is set via environment in polyglossia,
        // only a nested \\text<lang> command will reset the direction for LTR
        // languages (see # 10111).
-       bool const pg_rtl_env =
-               use_polyglossia && outer_language->rightToLeft() && !par_language->rightToLeft();
+       bool const in_polyglossia_rtl_env =
+               use_polyglossia
+               && runparams.local_font != 0
+               && outer_language->rightToLeft()
+               && !par_language->rightToLeft();
        bool const localswitch = text.inset().forceLocalFontSwitch()
                        || (using_begin_end && text.inset().forcePlainLayout())
-                       || pg_rtl_env;
+                       || in_polyglossia_rtl_env;
        if (localswitch) {
                lang_begin_command = use_polyglossia ?
                            "\\text$$lang$$opts{" : lyxrc.language_command_local;
@@ -1181,7 +1184,7 @@ void TeXOnePar(Buffer const & buf,
                                    || (atSameLastLangSwitchDepth(state)
                                        && state->lang_switch_depth_.size()
                                        && cur_lang != par_lang)
-                                   || pg_rtl_env)
+                                   || in_polyglossia_rtl_env)
                                {
                                        if (using_begin_end && !localswitch)
                                                os << breakln;
index d2e92912e48eccf7cef2d3f0b0886e2d40642696..8ff974acf11952498f0a9f958a74ef452ff69e75 100644 (file)
@@ -96,6 +96,9 @@ What's new
 
 - Fix text direction issue in info insets with RTL context (bug 10463).
 
+- Fix text direction problem with polyglossia with nested languages
+  (part of bug 10111).
+
 - Fix output of key symbols with info inset on the Mac (bug 10641).
 
 - Fix output of table cells with multiple languages (bug 11128).
@@ -108,7 +111,7 @@ What's new
 
 - Ignore horizontal wheel scrolling in work area (bug 11257).
 
-- Avoid crash wne cursor is outside of workarea (bug 11296).
+- Avoid crash when cursor is outside of work area (bug 11296).