diff --git a/src/plugins/platforms/wayland/qwaylandtextinputv3.cpp b/src/plugins/platforms/wayland/qwaylandtextinputv3.cpp index d98a7a5fca9..75c435a4c5f 100644 --- a/src/plugins/platforms/wayland/qwaylandtextinputv3.cpp +++ b/src/plugins/platforms/wayland/qwaylandtextinputv3.cpp @@ -146,7 +146,7 @@ void QWaylandTextInputv3::zwp_text_input_v3_done(uint32_t serial) // Current supported cursor shape is just line. // It means, cursorEnd and cursorBegin are the same. QInputMethodEvent::Attribute attribute1(QInputMethodEvent::Cursor, - m_pendingPreeditString.text.length(), + m_pendingPreeditString.cursorBegin, 1); attributes.append(attribute1); }