Skip to content

Commit 41b4a1f

Browse files
committed
Fix transparent diagnostics
1 parent 7273d71 commit 41b4a1f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

editors/code/src/diagnostics.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const URI_SCHEME = "rust-analyzer-diagnostics-view";
1515
export class TextDocumentProvider implements vscode.TextDocumentContentProvider {
1616
private _onDidChange = new vscode.EventEmitter<vscode.Uri>();
1717

18-
public constructor(private readonly ctx: Ctx) {}
18+
public constructor(private readonly ctx: Ctx) { }
1919

2020
get onDidChange(): vscode.Event<vscode.Uri> {
2121
return this._onDidChange.event;
@@ -67,7 +67,7 @@ interface AnserStyle {
6767
export class AnsiDecorationProvider implements vscode.Disposable {
6868
private _decorationTypes = new Map<AnserStyle, TextEditorDecorationType>();
6969

70-
public constructor(private readonly ctx: Ctx) {}
70+
public constructor(private readonly ctx: Ctx) { }
7171

7272
dispose(): void {
7373
for (const decorationType of this._decorationTypes.values()) {
@@ -207,11 +207,6 @@ export class AnsiDecorationProvider implements vscode.Disposable {
207207
}
208208
}
209209

210-
const themeColor = AnsiDecorationProvider._anserToThemeColor[color];
211-
if (themeColor) {
212-
return new ThemeColor("terminal." + themeColor);
213-
}
214-
215-
return undefined;
210+
return AnsiDecorationProvider._anserToThemeColor[color];
216211
}
217212
}

0 commit comments

Comments
 (0)