forked from qt-creator/qt-creator
LanguageClient: track all created diagnostic marks
Removing a block results in taking marks of that line out of the document, but does not delete those marks. So we cannot rely on iterating over marks of a document to delete all marks for a specific file. Instead save all marks from text mark creator for a file path and iterate this list to delete diagnostic marks. Fixes: QTCREATORBUG-26585 Change-Id: Idc41fce5de4ade68f4a29c23ba02844701b44d3c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -617,7 +617,7 @@ void Client::activateDocument(TextEditor::TextDocument *document)
|
||||
|
||||
void Client::deactivateDocument(TextEditor::TextDocument *document)
|
||||
{
|
||||
m_diagnosticManager.hideDiagnostics(document);
|
||||
m_diagnosticManager.hideDiagnostics(document->filePath());
|
||||
resetAssistProviders(document);
|
||||
document->setFormatter(nullptr);
|
||||
m_tokenSupport.clearHighlight(document);
|
||||
|
||||
Reference in New Issue
Block a user