mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix issues with file menu commands (#11254)
This commit is contained in:
@@ -625,7 +625,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||||||
handler: async (accessor, args?: { viewType: string }) => {
|
handler: async (accessor, args?: { viewType: string }) => {
|
||||||
const editorService = accessor.get(IEditorService);
|
const editorService = accessor.get(IEditorService);
|
||||||
|
|
||||||
if (args) {
|
if (args && args.viewType) { // {{SQL CARBON EDIT}} explicitly check for viewtype
|
||||||
const editorGroupsService = accessor.get(IEditorGroupsService);
|
const editorGroupsService = accessor.get(IEditorGroupsService);
|
||||||
const configurationService = accessor.get(IConfigurationService);
|
const configurationService = accessor.get(IConfigurationService);
|
||||||
const quickInputService = accessor.get(IQuickInputService);
|
const quickInputService = accessor.get(IQuickInputService);
|
||||||
@@ -651,11 +651,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||||||
const configurationService = accessor.get(IConfigurationService);
|
const configurationService = accessor.get(IConfigurationService);
|
||||||
const quickInputService = accessor.get(IQuickInputService);
|
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;
|
const group = editorGroupsService.activeGroup;
|
||||||
await openEditorWith(textInput, viewType, { pinned: true }, group, editorService, configurationService, quickInputService);
|
await openEditorWith(textInput, viewType, { pinned: true }, group, editorService, configurationService, quickInputService);
|
||||||
} else {
|
} else {
|
||||||
await editorService.openEditor({ options: { pinned: true } }); // untitled are always pinned
|
await editorService.openEditor({ options: { pinned: true }, mode: 'txt' }); // untitled are always pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user