[LyX/master] Change fall-back IM mode in math mode

Koji Yokota yokota at lyx.org
Thu Jun 25 00:59:27 UTC 2026


commit 326154d075b968b4859a4d971aa4c69897b95a93
Author: Koji Yokota <yokota at lyx.org>
Date:   Sat Jun 20 09:04:07 2026 +0900

    Change fall-back IM mode in math mode
    
    Make Language::inputMethodOffInMath() return true when
    languages.getFromCode() returns a null pointer so that IM will not
    turn on in the math mode. This occurs when IM is ibus-table-latex.
---
 src/frontends/qt/GuiInputMethod.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frontends/qt/GuiInputMethod.cpp b/src/frontends/qt/GuiInputMethod.cpp
index 0010e13a93..e2f40946b8 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -164,7 +164,7 @@ void GuiInputMethod::onLocaleChanged()
 	const std::string im_locale_code = fromqstr(d->sys_im_->locale().name());
 	const Language * lang = languages.getFromCode(im_locale_code);
 
-	d->im_off_in_math_ = lang != nullptr ? lang->inputMethodOffInMath() : false;
+	d->im_off_in_math_ = lang != nullptr ? lang->inputMethodOffInMath() : true;
 }
 
 


More information about the lyx-cvs mailing list