[LyX/master] Fix condition for IM composing mode

Koji Yokota yokota at lyx.org
Sun Aug 2 06:15:42 UTC 2026


commit 11a6c23d3d606aa9733ea54ef231d41328184baf
Author: Koji Yokota <yokota at lyx.org>
Date:   Sun Aug 2 15:15:33 2026 +0900

    Fix condition for IM composing mode
---
 src/frontends/qt/GuiInputMethod.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiInputMethod.cpp b/src/frontends/qt/GuiInputMethod.cpp
index 0ef7e9b342..01f7cc06ab 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -473,8 +473,7 @@ void GuiInputMethod::setPreeditStyle(
 	}
 #endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
 
-	d->im_state_.composing_mode_ =
-	        d->caret_rel_pos_ == (pos_type)d->preedit_str_.length();
+	d->im_state_.composing_mode_ = d->style_.segments_.size() == 1;
 
 	if (d->im_state_.composing_mode_) {
 		if (d->im_off_in_math_ ||


More information about the lyx-cvs mailing list