SCM - Fix configuration event registration in DirtyDiffWorkbenchController (#207476)

This commit is contained in:
Ladislau Szomoru
2024-03-12 16:39:18 +01:00
committed by GitHub
parent e6c533a7f4
commit 454eb4ffe5
@@ -1568,12 +1568,12 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor
this.onDidChangeConfiguration();
const onDidChangeDiffWidthConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorationsGutterWidth'));
onDidChangeDiffWidthConfiguration(this.onDidChangeDiffWidthConfiguration, this);
this._register(onDidChangeDiffWidthConfiguration(this.onDidChangeDiffWidthConfiguration, this));
this.onDidChangeDiffWidthConfiguration();
const onDidChangeDiffVisibilityConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorationsGutterVisibility'));
onDidChangeDiffVisibilityConfiguration(this.onDidChangeDiffVisibiltiyConfiguration, this);
this.onDidChangeDiffVisibiltiyConfiguration();
this._register(onDidChangeDiffVisibilityConfiguration(this.onDidChangeDiffVisibilityConfiguration, this));
this.onDidChangeDiffVisibilityConfiguration();
}
private onDidChangeConfiguration(): void {
@@ -1596,7 +1596,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor
this.setViewState({ ...this.viewState, width });
}
private onDidChangeDiffVisibiltiyConfiguration(): void {
private onDidChangeDiffVisibilityConfiguration(): void {
const visibility = this.configurationService.getValue<'always' | 'hover'>('scm.diffDecorationsGutterVisibility');
this.setViewState({ ...this.viewState, visibility });
}