提交 95e80bb9 编写于 作者: I isidor

fixes #42584

上级 9a1f471b
......@@ -267,6 +267,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
const editorService = accessor.get(IWorkbenchEditorService);
const editorGroupService = accessor.get(IEditorGroupService);
const listService = accessor.get(IListService);
const fileService = accessor.get(IFileService);
const tree = listService.lastFocusedList;
const resources = getMultiSelectedResources(resource, listService, editorService);
const stacks = editorGroupService.getStacksModel();
......@@ -279,17 +280,19 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
// Set side input
if (resources.length) {
return editorService.openEditors(resources.map(resource => {
return {
return fileService.resolveFiles(resources.map(resource => ({ resource }))).then(resolved => {
const editors = resolved.filter(r => r.success && !r.stat.isDirectory).map(r => ({
input: {
resource,
resource: r.stat.resource,
options: { preserveFocus: false }
}
};
}), true).then(() => {
if (activeGroup) {
editorGroupService.focusGroup(stacks.positionOfGroup(activeGroup) + 1);
}
}));
return editorService.openEditors(editors, true).then(() => {
if (activeGroup) {
editorGroupService.focusGroup(stacks.positionOfGroup(activeGroup) + 1);
}
});
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册