mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Amend 2d4ac90fd2
once more
Only use local switch in RTL environment.
(cherry picked from commit e158d661b9
)
This commit is contained in:
parent
5d13d8c783
commit
ac5c2be8db
@ -835,11 +835,14 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
// Also, if an RTL language is set via environment in polyglossia,
|
// Also, if an RTL language is set via environment in polyglossia,
|
||||||
// only a nested \\text<lang> command will reset the direction for LTR
|
// only a nested \\text<lang> command will reset the direction for LTR
|
||||||
// languages (see # 10111).
|
// languages (see # 10111).
|
||||||
bool const pg_rtl_env =
|
bool const in_polyglossia_rtl_env =
|
||||||
use_polyglossia && outer_language->rightToLeft() && !par_language->rightToLeft();
|
use_polyglossia
|
||||||
|
&& runparams.local_font != 0
|
||||||
|
&& outer_language->rightToLeft()
|
||||||
|
&& !par_language->rightToLeft();
|
||||||
bool const localswitch = text.inset().forceLocalFontSwitch()
|
bool const localswitch = text.inset().forceLocalFontSwitch()
|
||||||
|| (using_begin_end && text.inset().forcePlainLayout())
|
|| (using_begin_end && text.inset().forcePlainLayout())
|
||||||
|| pg_rtl_env;
|
|| in_polyglossia_rtl_env;
|
||||||
if (localswitch) {
|
if (localswitch) {
|
||||||
lang_begin_command = use_polyglossia ?
|
lang_begin_command = use_polyglossia ?
|
||||||
"\\text$$lang$$opts{" : lyxrc.language_command_local;
|
"\\text$$lang$$opts{" : lyxrc.language_command_local;
|
||||||
@ -1181,7 +1184,7 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
|| (atSameLastLangSwitchDepth(state)
|
|| (atSameLastLangSwitchDepth(state)
|
||||||
&& state->lang_switch_depth_.size()
|
&& state->lang_switch_depth_.size()
|
||||||
&& cur_lang != par_lang)
|
&& cur_lang != par_lang)
|
||||||
|| pg_rtl_env)
|
|| in_polyglossia_rtl_env)
|
||||||
{
|
{
|
||||||
if (using_begin_end && !localswitch)
|
if (using_begin_end && !localswitch)
|
||||||
os << breakln;
|
os << breakln;
|
||||||
|
@ -96,6 +96,9 @@ What's new
|
|||||||
|
|
||||||
- Fix text direction issue in info insets with RTL context (bug 10463).
|
- 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 key symbols with info inset on the Mac (bug 10641).
|
||||||
|
|
||||||
- Fix output of table cells with multiple languages (bug 11128).
|
- 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).
|
- 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).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user