Still gray out vars even if user has disabled suggestions

Fixes #50890
This commit is contained in:
Matt Bierner 2018-05-31 11:56:50 -07:00
parent 015ec8303c
commit 3c11a065e7

View file

@ -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;
});
}
}