Blame SOURCES/0038-Set-preedit-cursor-when-cursor-equals-to-0.patch

429548
From e0646f531e1e73a90a93faaa45d933ae40769985 Mon Sep 17 00:00:00 2001
429548
From: Weng Xuetian <wengxt@gmail.com>
429548
Date: Sat, 18 Dec 2021 23:42:49 -0800
429548
Subject: [PATCH 38/41] Set preedit cursor when cursor equals to 0
429548
429548
Pick-to: 6.3 6.2 5.15
429548
Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58
429548
Reviewed-by: Liang Qi <liang.qi@qt.io>
429548
(cherry picked from commit 719a55be13bdadfa659a732755f280e276a894bd)
429548
---
429548
 src/shared/qwaylandinputmethodeventbuilder.cpp | 2 +-
429548
 1 file changed, 1 insertion(+), 1 deletion(-)
429548
429548
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp
429548
index 526d0ef4..25be2509 100644
429548
--- a/src/shared/qwaylandinputmethodeventbuilder.cpp
429548
+++ b/src/shared/qwaylandinputmethodeventbuilder.cpp
429548
@@ -151,7 +151,7 @@ QInputMethodEvent QWaylandInputMethodEventBuilder::buildPreedit(const QString &t
429548
 {
429548
     QList<QInputMethodEvent::Attribute> attributes;
429548
 
429548
-    if (m_preeditCursor < 0) {
429548
+    if (m_preeditCursor <= 0) {
429548
         attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, 0, 0, QVariant()));
429548
     } else if (m_preeditCursor > 0) {
429548
         attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant()));
429548
-- 
429548
2.34.1
429548