提交 ec78f9ee 编写于 作者: P Pine Wu

Fix #77449

上级 9db05a84
......@@ -698,7 +698,7 @@ export class SettingArrayRenderer extends AbstractSettingRenderer implements ITr
private onDidChangeList(template: ISettingListItemTemplate, e: IListChangeEvent): void {
if (template.context) {
const newValue: any[] | undefined = isArray(template.context.scopeValue)
const newValue: any[] = isArray(template.context.scopeValue)
? [...template.context.scopeValue]
: [...template.context.value];
......@@ -725,6 +725,19 @@ export class SettingArrayRenderer extends AbstractSettingRenderer implements ITr
}
}
if (
template.context.defaultValue &&
isArray(template.context.defaultValue) &&
template.context.defaultValue.length === newValue.length &&
template.context.defaultValue.join() === newValue.join()
) {
return this._onDidChangeSetting.fire({
key: template.context.setting.key,
value: undefined, // reset setting
type: template.context.valueType
});
}
this._onDidChangeSetting.fire({
key: template.context.setting.key,
value: newValue,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册