forked from qt-creator/qt-creator
LanguageClient: reapply semantic highlight after font changed
Change-Id: I609e26b7f85744fdffb8399e0d651691b7c39900 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1354,6 +1354,7 @@ void Client::handleSemanticHighlight(const SemanticHighlightingParams ¶ms)
|
||||
void Client::rehighlight()
|
||||
{
|
||||
using namespace TextEditor;
|
||||
m_tokentSupport.rehighlight();
|
||||
for (auto it = m_highlights.begin(), end = m_highlights.end(); it != end; ++it) {
|
||||
if (TextDocument *doc = TextDocument::textDocumentForFilePath(it.key().toFilePath())) {
|
||||
if (LanguageClientManager::clientForDocument(doc) == this)
|
||||
|
@@ -374,8 +374,9 @@ void SemanticTokenSupport::handleSemanticTokens(const Utils::FilePath &filePath,
|
||||
if (auto tokens = Utils::get_if<SemanticTokens>(&result)) {
|
||||
m_tokens[filePath] = *tokens;
|
||||
highlight(filePath);
|
||||
} else {
|
||||
m_tokens.remove(filePath);
|
||||
}
|
||||
m_tokens.remove(filePath);
|
||||
}
|
||||
|
||||
void SemanticTokenSupport::handleSemanticTokensDelta(
|
||||
|
Reference in New Issue
Block a user