[LyX/master] Fix condition for IM composing mode

Koji Yokota <[email protected]> Sun, 02 Aug 2026 06:15:42 +0000
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 11a6c23d3d606aa9733ea54ef231d41328184baf
Author: Koji Yokota <[email protected]>
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_ ||
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs