mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Allow setting startupEditor to readme as either default value or user value.
Fix github/codespaces#1580
This commit is contained in:
committed by
Sandeep Somavarapu
parent
370a7ee077
commit
5d650cd817
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user