LanguageClient: correctly track current hover request

Change-Id: I6c5b90aa8c3fd7611e48c0cd676dc1c1f9b9e562
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-06-04 13:26:13 +02:00
parent 90ea538f24
commit 64434b9fb4

View File

@@ -102,6 +102,7 @@ void HoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget,
QTextCursor cursor = editorWidget->textCursor();
cursor.setPosition(pos);
HoverRequest request((TextDocumentPositionParams(TextDocumentIdentifier(uri), Position(cursor))));
m_currentRequest = request.id();
request.setResponseCallback(
[this](const HoverRequest::Response &response) { handleResponse(response); });
m_client->sendContent(request);