diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index ed7d292b0d2..3e98384f357 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -145,7 +145,7 @@ async function deleteFiles(explorerService: IExplorerService, workingCopyFileSer let confirmation: IConfirmationResult; // We do not support undo of folders, so in that case the delete action is irreversible const deleteDetail = distinctElements.some(e => e.isDirectory) ? nls.localize('irreversible', "This action is irreversible!") : - distinctElements.length > 1 ? nls.localize('restorePlural', "You can restore these files using the Undo command") : nls.localize('restore', "You can restore this file using the Undo command"); + distinctElements.length > 1 ? nls.localize('restorePlural', "You can restore these files using the Undo command.") : nls.localize('restore', "You can restore this file using the Undo command."); // Check if we need to ask for confirmation at all if (skipConfirm || (useTrash && configurationService.getValue(CONFIRM_DELETE_SETTING_KEY) === false)) { diff --git a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts index 2256c93b8b8..5e7f7f223d1 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts @@ -423,8 +423,17 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon } }); } - run(accessor: ServicesAccessor, resource: URI) { - return accessor.get(IPreferencesService).openFolderSettings({ folderUri: resource }); + async run(accessor: ServicesAccessor, resource?: URI) { + if (URI.isUri(resource)) { + await accessor.get(IPreferencesService).openFolderSettings({ folderUri: resource }); + } else { + const commandService = accessor.get(ICommandService); + const preferencesService = accessor.get(IPreferencesService); + const workspaceFolder = await commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID); + if (workspaceFolder) { + await preferencesService.openFolderSettings({ folderUri: workspaceFolder.uri }); + } + } } })); this._register(registerAction2(class extends Action2 {