提交 3c11a065 编写于 作者: M Matt Bierner

Still gray out vars even if user has disabled suggestions

Fixes #50890
上级 015ec830
......@@ -156,10 +156,12 @@ export class DiagnosticsManager {
}
private getSuggestionDiagnostics(file: vscode.Uri) {
if (!this._enableSuggestions) {
return [];
}
return this._diagnostics.get(DiagnosticKind.Suggestion)!.get(file);
return this._diagnostics.get(DiagnosticKind.Suggestion)!.get(file).filter(x => {
if (!this._enableSuggestions) {
// Still show unused
return x.customTags && x.customTags.indexOf(vscode.DiagnosticTag.Unnecessary) !== -1;
}
return true;
});
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册