LanguageClient: track document highlight request based on widgets

We can have multiple widgets per document, so we can have multiple
different cursors for the same document. Tracking document highlights
per widget prevents cancelling a potentially valid request for another
text cursor of another widget.

Change-Id: I800d9be5b44b327351252ab90305b8882efa87bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-03-30 10:27:02 +02:00
parent ccdd0d666d
commit 1e8879ee72
2 changed files with 12 additions and 9 deletions

View File

@@ -229,7 +229,7 @@ private:
AssistProviders m_clientProviders;
QMap<TextEditor::TextDocument *, AssistProviders> m_resetAssistProvider;
QHash<LanguageServerProtocol::DocumentUri, LanguageServerProtocol::MessageId> m_highlightRequests;
QHash<TextEditor::TextEditorWidget *, LanguageServerProtocol::MessageId> m_highlightRequests;
int m_restartsLeft = 5;
QScopedPointer<BaseClientInterface> m_clientInterface;
DiagnosticManager m_diagnosticManager;