Skip to content

Commit 74f567d

Browse files
committed
Rename and move decoration object
1 parent d444874 commit 74f567d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ class DefaultClient implements Client {
204204
private crashTimes: number[] = [];
205205
private failureMessageShown = new PersistentState<boolean>("DefaultClient.failureMessageShown", false);
206206
private isSupported: boolean = true;
207+
private inactiveRegionsDecoration : vscode.TextEditorDecorationType;
207208

208209
// The "model" that is displayed via the UI (status bar).
209210
private model: ClientModel = {
@@ -627,23 +628,22 @@ class DefaultClient implements Client {
627628
this.model.tagParserStatus.Value = notificationBody.status;
628629
}
629630

630-
private decoration : vscode.TextEditorDecorationType;
631631
private updateInactiveRegions(params: InactiveRegionParams): void {
632632
let renderOptions: vscode.DecorationRenderOptions = {
633-
light: { color: "rgba(125,125,125,0.0)" },
634-
dark: { color: "rgba(155,155,155,0.0)" }
633+
light: { color: "rgba(125,125,125,1.0)" },
634+
dark: { color: "rgba(155,155,155,1.0)" }
635635
};
636636

637637
// Recycle the active text decorations when we receive a new set of inactive regions
638-
if (this.decoration !== undefined) {
639-
this.decoration.dispose();
638+
if (this.inactiveRegionsDecoration !== undefined) {
639+
this.inactiveRegionsDecoration.dispose();
640640
}
641-
this.decoration = vscode.window.createTextEditorDecorationType(renderOptions);
641+
this.inactiveRegionsDecoration = vscode.window.createTextEditorDecorationType(renderOptions);
642642

643643
// Apply the decorations to all relevant editors
644644
let editors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => e.document.uri.toString() === params.uri);
645645
for (let e of editors) {
646-
e.setDecorations(this.decoration, params.ranges);
646+
e.setDecorations(this.inactiveRegionsDecoration, params.ranges);
647647
}
648648
}
649649

0 commit comments

Comments
 (0)