Skip to content

Commit 42e27fe

Browse files
authored
Merge pull request #117982 from microsoft/roblou/settingsOpenEditor
Ensure EditorOptions subclass is passed to openEditor
2 parents 911868f + ac57542 commit 42e27fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/services/preferences/browser/preferencesService.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
221221
...options,
222222
focusSearch: true
223223
};
224-
return this.editorService.openEditor(input, options ? { ...SettingsEditorOptions.create(options), override: EditorOverride.DISABLED } : { override: EditorOverride.DISABLED })
224+
return this.editorService.openEditor(input, options ? SettingsEditorOptions.create({ ...options, override: EditorOverride.DISABLED }) : { override: EditorOverride.DISABLED })
225225
.then(() => this.editorGroupService.activeGroup.activeEditorPane!);
226226
}
227227

@@ -364,7 +364,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
364364
this.editorService.openEditor(editableSettingsEditorInput, { pinned: true, revealIfOpened: true, override: EditorOverride.DISABLED }, sideEditorGroup.id)
365365
]).then(([defaultEditor, editor]) => withNullAsUndefined(editor));
366366
} else {
367-
return this.editorService.openEditor(editableSettingsEditorInput, { ...SettingsEditorOptions.create(options), override: EditorOverride.DISABLED }, group);
367+
return this.editorService.openEditor(editableSettingsEditorInput, SettingsEditorOptions.create({ ...options, override: EditorOverride.DISABLED }), group);
368368
}
369369
});
370370
}
@@ -381,7 +381,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
381381
const defaultPreferencesEditorInput = this.instantiationService.createInstance(DefaultPreferencesEditorInput, this.getDefaultSettingsResource(configurationTarget));
382382
const preferencesEditorInput = new PreferencesEditorInput(this.getPreferencesEditorInputName(configurationTarget, resource), editableSettingsEditorInput.getDescription(), defaultPreferencesEditorInput, <EditorInput>editableSettingsEditorInput);
383383
this.lastOpenedSettingsInput = preferencesEditorInput;
384-
return this.editorService.openEditor(preferencesEditorInput, { ...SettingsEditorOptions.create(options), override: EditorOverride.DISABLED }, group);
384+
return this.editorService.openEditor(preferencesEditorInput, SettingsEditorOptions.create({ ...options, override: EditorOverride.DISABLED }), group);
385385
});
386386
}
387387

0 commit comments

Comments
 (0)