Skip to content

Commit

Permalink
Merge pull request #117982 from microsoft/roblou/settingsOpenEditor
Browse files Browse the repository at this point in the history
Ensure EditorOptions subclass is passed to openEditor
  • Loading branch information
roblourens authored Mar 2, 2021
2 parents 911868f + ac57542 commit 42e27fe
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
...options,
focusSearch: true
};
return this.editorService.openEditor(input, options ? { ...SettingsEditorOptions.create(options), override: EditorOverride.DISABLED } : { override: EditorOverride.DISABLED })
return this.editorService.openEditor(input, options ? SettingsEditorOptions.create({ ...options, override: EditorOverride.DISABLED }) : { override: EditorOverride.DISABLED })
.then(() => this.editorGroupService.activeGroup.activeEditorPane!);
}

Expand Down Expand Up @@ -364,7 +364,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
this.editorService.openEditor(editableSettingsEditorInput, { pinned: true, revealIfOpened: true, override: EditorOverride.DISABLED }, sideEditorGroup.id)
]).then(([defaultEditor, editor]) => withNullAsUndefined(editor));
} else {
return this.editorService.openEditor(editableSettingsEditorInput, { ...SettingsEditorOptions.create(options), override: EditorOverride.DISABLED }, group);
return this.editorService.openEditor(editableSettingsEditorInput, SettingsEditorOptions.create({ ...options, override: EditorOverride.DISABLED }), group);
}
});
}
Expand All @@ -381,7 +381,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
const defaultPreferencesEditorInput = this.instantiationService.createInstance(DefaultPreferencesEditorInput, this.getDefaultSettingsResource(configurationTarget));
const preferencesEditorInput = new PreferencesEditorInput(this.getPreferencesEditorInputName(configurationTarget, resource), editableSettingsEditorInput.getDescription(), defaultPreferencesEditorInput, <EditorInput>editableSettingsEditorInput);
this.lastOpenedSettingsInput = preferencesEditorInput;
return this.editorService.openEditor(preferencesEditorInput, { ...SettingsEditorOptions.create(options), override: EditorOverride.DISABLED }, group);
return this.editorService.openEditor(preferencesEditorInput, SettingsEditorOptions.create({ ...options, override: EditorOverride.DISABLED }), group);
});
}

Expand Down

0 comments on commit 42e27fe

Please sign in to comment.