LanguageClient: fix dynamic registered hover provider

Change-Id: I48580b84c310c69ff72fba743260806bd236752f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-01-20 13:29:12 +01:00
parent aab88f5e7a
commit 90746d8623

View File

@@ -59,9 +59,7 @@ void HoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget,
{ {
if (m_currentRequest.has_value()) if (m_currentRequest.has_value())
abort(); abort();
if (m_client.isNull() if (m_client.isNull() || !m_client->documentOpen(editorWidget->textDocument())) {
|| !m_client->documentOpen(editorWidget->textDocument())
|| !m_client->capabilities().hoverProvider().value_or(false)) {
report(Priority_None); report(Priority_None);
return; return;
} }