Skip to content

Commit

Permalink
SCM - Fix configuration event registration in DirtyDiffWorkbenchContr…
Browse files Browse the repository at this point in the history
…oller (#207476)
  • Loading branch information
lszomoru authored Mar 12, 2024
1 parent e6c533a commit 454eb4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 });
}
Expand Down

0 comments on commit 454eb4f

Please sign in to comment.