From d53bb74cce7f92d794595ec0569bbe2fbaeb2a31 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 16 Jan 2018 18:18:29 +0100 Subject: [PATCH] fix cmd+w not working --- src/vs/workbench/browser/parts/editor/editorCommands.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index a2555b8247f..a09a31f09cf 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -307,6 +307,14 @@ function registerEditorCommands() { const groups = distinct(contexts.map(context => context.group)); const editorsToClose = new Map(); + + if (groups.length === 0) { + const activeEditor = editorService.getActiveEditor(); + if (activeEditor) { + return editorService.closeEditor(activeEditor.position, activeEditor.input); + } + } + groups.forEach(group => { const position = editorGroupService.getStacksModel().positionOfGroup(group); editorsToClose.set(position, contexts.map(c => { -- GitLab