提交 dee172df 编写于 作者: S Sandeep Somavarapu

Fix #31558

上级 703fb75e
......@@ -999,26 +999,23 @@ class UnsupportedWorkbenchSettingsRenderer extends Disposable {
}
public render(): void {
this.editor.changeDecorations(changeAccessor => this.decorationIds = changeAccessor.deltaDecorations(this.decorationIds, []));
const ranges: IRange[] = [];
const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).getConfigurationProperties();
const folderKeys = this.configurationService.keys({ resource: this.workspaceSettingsEditorModel.uri }).folder;
const workbenchKeys = folderKeys.filter(key => configurationRegistry[key] && configurationRegistry[key].scope === ConfigurationScope.WINDOW);
if (workbenchKeys.length) {
const ranges: IRange[] = [];
for (const unsupportedKey of workbenchKeys) {
const setting = this.workspaceSettingsEditorModel.getPreference(unsupportedKey);
if (setting) {
ranges.push({
startLineNumber: setting.keyRange.startLineNumber,
startColumn: setting.keyRange.startColumn - 1,
endLineNumber: setting.valueRange.endLineNumber,
endColumn: setting.valueRange.endColumn
});
for (const settingsGroup of this.workspaceSettingsEditorModel.settingsGroups) {
for (const section of settingsGroup.sections) {
for (const setting of section.settings) {
if (configurationRegistry[setting.key] && configurationRegistry[setting.key].scope === ConfigurationScope.WINDOW) {
ranges.push({
startLineNumber: setting.keyRange.startLineNumber,
startColumn: setting.keyRange.startColumn - 1,
endLineNumber: setting.valueRange.endLineNumber,
endColumn: setting.valueRange.endColumn
});
}
}
}
this.editor.changeDecorations(changeAccessor => this.decorationIds = changeAccessor.deltaDecorations(this.decorationIds, ranges.map(range => this.createDecoration(range, this.editor.getModel()))));
}
this.editor.changeDecorations(changeAccessor => this.decorationIds = changeAccessor.deltaDecorations(this.decorationIds, ranges.map(range => this.createDecoration(range, this.editor.getModel()))));
}
private static _DIM_CONFIGUARATION_ = ModelDecorationOptions.register({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册