mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Allow setting startupEditor to readme
as either default value or user value.
Fix github/codespaces#1580
This commit is contained in:
parent
5115a8eae7
commit
ff7921ebd1
|
@ -72,7 +72,12 @@ export class WelcomePageContribution implements IWorkbenchContribution {
|
|||
// Open the welcome even if we opened a set of default editors
|
||||
if ((!editorService.activeEditor || layoutService.openedDefaultEditors) && !hasBackups) {
|
||||
const startupEditorSetting = configurationService.inspect<string>(configurationKey);
|
||||
const openWithReadme = startupEditorSetting.userValue === 'readme';
|
||||
|
||||
// 'readme' should not be set in workspace settings to prevent tracking,
|
||||
// but it can be set as a default (as in codespaces) or a user setting
|
||||
const openWithReadme = startupEditorSetting.value === 'readme' &&
|
||||
(startupEditorSetting.userValue === 'readme' || startupEditorSetting.defaultValue === 'readme');
|
||||
|
||||
if (openWithReadme) {
|
||||
return Promise.all(contextService.getWorkspace().folders.map(folder => {
|
||||
const folderUri = folder.uri;
|
||||
|
|
Loading…
Reference in a new issue