From a69032e3172608e17984507b40d2bb9c8c509750 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Wed, 8 Jul 2020 18:52:26 -0700 Subject: [PATCH] fix issues with file menu commands (#11254) --- src/vs/workbench/contrib/files/browser/fileCommands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/fileCommands.ts b/src/vs/workbench/contrib/files/browser/fileCommands.ts index 9eb57377dc..caa3e3dd64 100644 --- a/src/vs/workbench/contrib/files/browser/fileCommands.ts +++ b/src/vs/workbench/contrib/files/browser/fileCommands.ts @@ -625,7 +625,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ handler: async (accessor, args?: { viewType: string }) => { const editorService = accessor.get(IEditorService); - if (args) { + if (args && args.viewType) { // {{SQL CARBON EDIT}} explicitly check for viewtype const editorGroupsService = accessor.get(IEditorGroupsService); const configurationService = accessor.get(IConfigurationService); const quickInputService = accessor.get(IQuickInputService); @@ -651,11 +651,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ const configurationService = accessor.get(IConfigurationService); const quickInputService = accessor.get(IQuickInputService); - const textInput = editorService.createEditorInput({ options: { pinned: true } }); + const textInput = editorService.createEditorInput({ options: { pinned: true }, mode: 'txt' }); const group = editorGroupsService.activeGroup; await openEditorWith(textInput, viewType, { pinned: true }, group, editorService, configurationService, quickInputService); } else { - await editorService.openEditor({ options: { pinned: true } }); // untitled are always pinned + await editorService.openEditor({ options: { pinned: true }, mode: 'txt' }); // untitled are always pinned } } });