forked from qt-creator/qt-creator
LanguageClient: Do not re-highlight when receiving the error variant
... of a SemanticTokens message. Change-Id: I0f6e55d6656c11e7925e3bc4400ea2e575b9f138 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -371,11 +371,11 @@ SemanticRequestTypes SemanticTokenSupport::supportedSemanticRequests(TextDocumen
|
||||
void SemanticTokenSupport::handleSemanticTokens(const Utils::FilePath &filePath,
|
||||
const SemanticTokensResult &result)
|
||||
{
|
||||
if (auto tokens = Utils::get_if<SemanticTokens>(&result))
|
||||
if (auto tokens = Utils::get_if<SemanticTokens>(&result)) {
|
||||
m_tokens[filePath] = *tokens;
|
||||
else
|
||||
m_tokens.remove(filePath);
|
||||
highlight(filePath);
|
||||
highlight(filePath);
|
||||
}
|
||||
m_tokens.remove(filePath);
|
||||
}
|
||||
|
||||
void SemanticTokenSupport::handleSemanticTokensDelta(
|
||||
@@ -427,6 +427,7 @@ void SemanticTokenSupport::handleSemanticTokensDelta(
|
||||
tokens.setResultId(tokensDelta->resultId());
|
||||
} else {
|
||||
m_tokens.remove(filePath);
|
||||
return;
|
||||
}
|
||||
highlight(filePath);
|
||||
}
|
||||
|
Reference in New Issue
Block a user