From d1e5c8cddf4fba06aad2e4cffd5b146f2de10700 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Tue, 16 Mar 2021 14:50:12 +0100 Subject: [PATCH] Fix portsAttributes.unconfigured setting name And fix setting update not read Fixes #118991 --- src/vs/workbench/contrib/remote/common/remote.contribution.ts | 2 +- .../workbench/services/remote/common/remoteExplorerService.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/remote/common/remote.contribution.ts b/src/vs/workbench/contrib/remote/common/remote.contribution.ts index c702058db01..fe5715db615 100644 --- a/src/vs/workbench/contrib/remote/common/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/common/remote.contribution.ts @@ -189,7 +189,7 @@ Registry.as(ConfigurationExtensions.Configuration) errorMessage: localize('remote.portsAttributes.patternError', "Must be a port number, range of port numbers, or regular expression."), additionalProperties: false }, - 'remote.portsAttributes.unconfigured': { + 'remote.unconfiguredPortsAttributes': { type: 'object', properties: { 'onAutoForward': { diff --git a/src/vs/workbench/services/remote/common/remoteExplorerService.ts b/src/vs/workbench/services/remote/common/remoteExplorerService.ts index 6b2af5bcdb5..f0d81ce914b 100644 --- a/src/vs/workbench/services/remote/common/remoteExplorerService.ts +++ b/src/vs/workbench/services/remote/common/remoteExplorerService.ts @@ -154,7 +154,7 @@ interface PortAttributes extends Attributes { export class PortsAttributes extends Disposable { private static SETTING = 'remote.portsAttributes'; - private static DEFAULTS = 'remote.portsAttributes.unconfigured'; + private static DEFAULTS = 'remote.unconfiguredPortsAttributes'; private static RANGE = /^(\d+)\-(\d+)$/; private portsAttributes: PortAttributes[] = []; private defaultPortAttributes: Attributes | undefined; @@ -164,7 +164,7 @@ export class PortsAttributes extends Disposable { constructor(private readonly configurationService: IConfigurationService) { super(); this._register(configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(PortsAttributes.SETTING)) { + if (e.affectsConfiguration(PortsAttributes.SETTING) || e.affectsConfiguration(PortsAttributes.DEFAULTS)) { this.updateAttributes(); } }));