diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 4ba7da7fc..deb273f49 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -1056,8 +1056,11 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev) break; } case QInputMethodEvent::Cursor: - if (attribute.length) - cursorPositionInPreeditString = attribute.start; + // Always set the position of the cursor, even if it's marked invisible by Qt, otherwise + // there is no way the user will know which part of the composition string will be + // changed, when performing an IME-specific action (like selecting a different word + // suggestion). + cursorPositionInPreeditString = attribute.start; break; case QInputMethodEvent::Selection: selectionRange.set_start(qMin(attribute.start, (attribute.start + attribute.length))); |