mirror of https://github.com/microsoft/vscode.git
fix: compound language settings serialize incorrectly (#252539)
This commit is contained in:
parent
ee0fdc82a3
commit
96a6b409aa
|
@ -347,5 +347,8 @@ export function merge(base: any, add: any, overwrite: boolean): void {
|
|||
}
|
||||
|
||||
export function getLanguageTagSettingPlainKey(settingKey: string) {
|
||||
return settingKey.replace(/[\[\]]/g, '');
|
||||
return settingKey
|
||||
.replace(/^\[/, '')
|
||||
.replace(/]$/g, '')
|
||||
.replace(/\]\[/g, ', ');
|
||||
}
|
||||
|
|
|
@ -472,7 +472,7 @@ class ConfigurationRegistry extends Disposable implements IConfigurationRegistry
|
|||
const property: IRegisteredConfigurationPropertySchema = {
|
||||
type: 'object',
|
||||
default: newDefaultOverride.value,
|
||||
description: nls.localize('defaultLanguageConfiguration.description', "Configure settings to be overridden for the {0} language.", getLanguageTagSettingPlainKey(key)),
|
||||
description: nls.localize('defaultLanguageConfiguration.description', "Configure settings to be overridden for {0}.", getLanguageTagSettingPlainKey(key)),
|
||||
$ref: resourceLanguageSettingsSchemaId,
|
||||
defaultDefaultValue: newDefaultOverride.value,
|
||||
source,
|
||||
|
|
|
@ -1179,7 +1179,7 @@ export class SettingComplexRenderer extends AbstractSettingRenderer implements I
|
|||
|
||||
const onClickOrKeydown = (e: UIEvent) => {
|
||||
if (isLanguageTagSetting) {
|
||||
this._onApplyFilter.fire(`@${LANGUAGE_SETTING_TAG}${plainKey}`);
|
||||
this._onApplyFilter.fire(`@${LANGUAGE_SETTING_TAG}${plainKey.replaceAll(' ', '')}`);
|
||||
} else {
|
||||
this._onDidOpenSettings.fire(dataElement.setting.key);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import { escapeRegExpCharacters, isFalsyOrWhitespace } from '../../../../base/co
|
|||
import { isUndefinedOrNull } from '../../../../base/common/types.js';
|
||||
import { URI } from '../../../../base/common/uri.js';
|
||||
import { ILanguageService } from '../../../../editor/common/languages/language.js';
|
||||
import { ConfigurationTarget, IConfigurationValue } from '../../../../platform/configuration/common/configuration.js';
|
||||
import { ConfigurationTarget, getLanguageTagSettingPlainKey, IConfigurationValue } from '../../../../platform/configuration/common/configuration.js';
|
||||
import { ConfigurationDefaultValueSource, ConfigurationScope, EditPresentationTypes, Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';
|
||||
import { IProductService } from '../../../../platform/product/common/productService.js';
|
||||
import { Registry } from '../../../../platform/registry/common/platform.js';
|
||||
|
@ -719,7 +719,7 @@ export function settingKeyToDisplayFormat(key: string, groupId: string = '', isL
|
|||
category = wordifyKey(category);
|
||||
|
||||
if (isLanguageTagSetting) {
|
||||
key = key.replace(/[\[\]]/g, '');
|
||||
key = getLanguageTagSettingPlainKey(key);
|
||||
key = '$(bracket) ' + key;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue