summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/qwaylandinputmethodeventbuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp
index fcaa0647..e0a3e798 100644
--- a/src/shared/qwaylandinputmethodeventbuilder.cpp
+++ b/src/shared/qwaylandinputmethodeventbuilder.cpp
@@ -162,9 +162,9 @@ QInputMethodEvent *QWaylandInputMethodEventBuilder::buildPreedit(const QString &
{
QList<QInputMethodEvent::Attribute> attributes;
- if (m_preeditCursor <= 0) {
+ if (m_preeditCursor < 0) {
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, 0, 0, QVariant()));
- } else if (m_preeditCursor > 0) {
+ } else {
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant()));
}