diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index dba6f93cc22..f53d4dd9dc9 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -469,6 +469,7 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document, cursor.setPosition(position + charsRemoved); cursor.setPosition(position, QTextCursor::KeepAnchor); change.setRange(Range(cursor)); + change.setRangeLength(cursor.selectionEnd() - cursor.selectionStart()); change.setText(document->textAt(position, charsAdded)); params.setContentChanges({change}); } else {