diff options
author | David Schulz <david.schulz@qt.io> | 2019-07-18 10:52:27 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2019-07-19 06:00:58 +0000 |
commit | c65e480cbd9511b0641d9fdc46c86694767b3a87 (patch) | |
tree | 8d60bd998a01afbf14bb62673230e04f7b86df67 /src/plugins/languageclient | |
parent | 53ca9752e25ec60f7f9a5da2958c776efa9696d9 (diff) | |
download | qt-creator-c65e480cbd9511b0641d9fdc46c86694767b3a87.tar.gz |
LanguageClient: include the range length in document updates
The did change notification parameter has an arguable redundant range
length field, but it seems that there are language server out there
which rely on the presence of this field.
Change-Id: Id29132fb6586a2886b8ba6d9a13df52a64f31161
Fixes: QTCREATORBUG-22694
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/languageclient')
-rw-r--r-- | src/plugins/languageclient/client.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index dba6f93cc2..f53d4dd9dc 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 { |