diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 97fe6ff06e..3cec4ee77d 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -94,7 +94,7 @@ NameTranslator const & nameTranslator() InsetInfo::InsetInfo(Buffer * buf, string const & name) : InsetCollapsible(buf), initialized_(false), - type_(UNKNOWN_INFO), name_() + type_(UNKNOWN_INFO), name_(), force_ltr_(false) { setInfo(name); status_ = Collapsed; @@ -299,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_; } @@ -314,6 +314,7 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) { BufferParams const & bp = buffer().params(); + force_ltr_ = false; switch (type_) { case UNKNOWN_INFO: error("Unknown Info: %1$s"); @@ -337,6 +338,7 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) { 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 4a1637fd82..9ac63489fb 100644 --- a/src/insets/InsetInfo.h +++ b/src/insets/InsetInfo.h @@ -155,6 +155,8 @@ private: info_type type_; /// std::string name_; + /// + bool force_ltr_; };