summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandinputcontext.cpp')
-rw-r--r--src/client/qwaylandinputcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
index f211780fd..af8e6f818 100644
--- a/src/client/qwaylandinputcontext.cpp
+++ b/src/client/qwaylandinputcontext.cpp
@@ -157,7 +157,7 @@ void QWaylandTextInput::updateState(Qt::InputMethodQueries queries, uint32_t fla
anchor -= offset;
}
- set_surrounding_text(text, text.leftRef(cursor).toUtf8().size(), text.leftRef(anchor).toUtf8().size());
+ set_surrounding_text(text, QWaylandInputMethodEventBuilder::indexToWayland(text, cursor), QWaylandInputMethodEventBuilder::indexToWayland(text, anchor));
}
if (queries & Qt::ImHints) {