Skip to content

Commit 12b060f

Browse files
authored
Git - fix bug related to toggling git decorations (microsoft#172637) (microsoft#236055)
1 parent 13a37df commit 12b060f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

extensions/git/src/decorationProvider.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ class GitIncomingChangesFileDecorationProvider implements FileDecorationProvider
273273

274274
export class GitDecorations {
275275

276+
private enabled = false;
276277
private disposables: Disposable[] = [];
277278
private modelDisposables: Disposable[] = [];
278279
private providers = new Map<Repository, Disposable>();
@@ -286,13 +287,19 @@ export class GitDecorations {
286287
}
287288

288289
private update(): void {
289-
const enabled = workspace.getConfiguration('git').get('decorations.enabled');
290+
const config = workspace.getConfiguration('git');
291+
const enabled = config.get<boolean>('decorations.enabled') === true;
292+
if (this.enabled === enabled) {
293+
return;
294+
}
290295

291296
if (enabled) {
292297
this.enable();
293298
} else {
294299
this.disable();
295300
}
301+
302+
this.enabled = enabled;
296303
}
297304

298305
private enable(): void {

0 commit comments

Comments
 (0)