commit ae8c0b29769915967c91d5923c2c02a695137f0f
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Jul 25 11:38:56 2018 +0200

    Amend 79cf3f5ec10
    
    Some InfoInsets have to be LTR always.
---
 src/insets/InsetInfo.cpp |    7 +++++--
 src/insets/InsetInfo.h   |    2 ++
 status.23x               |    2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp
index 9a8d2dd..3205cc1 100644
--- a/src/insets/InsetInfo.cpp
+++ b/src/insets/InsetInfo.cpp
@@ -93,7 +93,8 @@ NameTranslator const & nameTranslator()
 
 
 InsetInfo::InsetInfo(Buffer * buf, string const & name)
-       : InsetCollapsible(buf), type_(UNKNOWN_INFO), name_()
+       : InsetCollapsible(buf), type_(UNKNOWN_INFO), name_(),
+       force_ltr_(false)
 {
        setInfo(name);
        status_ = Collapsed;
@@ -298,7 +299,7 @@ void InsetInfo::setText(docstring const & str)
 
 bool InsetInfo::forceLTR() const
 {
-       return !buffer().params().language->rightToLeft();
+       return !buffer().params().language->rightToLeft() || force_ltr_;
 }
 
 
@@ -306,6 +307,7 @@ void InsetInfo::updateInfo()
 {
        BufferParams const & bp = buffer().params();
 
+       force_ltr_ = false;
        switch (type_) {
        case UNKNOWN_INFO:
                error("Unknown Info: %1$s");
@@ -327,6 +329,7 @@ void InsetInfo::updateInfo()
                        setText(bindings.begin()->print(KeySequence::Portable));
                else
                        setText(theTopLevelKeymap().printBindings(func, 
KeySequence::Portable));
+               force_ltr_ = true;
                break;
        }
        case LYXRC_INFO: {
diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h
index 4e3f290..36b224e 100644
--- a/src/insets/InsetInfo.h
+++ b/src/insets/InsetInfo.h
@@ -153,6 +153,8 @@ private:
        info_type type_;
        ///
        std::string name_;
+       ///
+       bool force_ltr_;
 };
 
 
diff --git a/status.23x b/status.23x
index d33c3d1..dbe3a46 100644
--- a/status.23x
+++ b/status.23x
@@ -77,6 +77,8 @@ What's new
 
 - Fix text direction in figure wrap floats with RTL (bug 11029).
 
+- Fix text direction issue in info insets with RTL context (bug 10463).
+
 
 * USER INTERFACE
 

Reply via email to