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

Fix #31558

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