提交 11daba9b 编写于 作者: N Nate Rauh 提交者: Benjamin Pasero

Feature/pin close others (#82545)

* Pin the active editor when closing other editors

* Pin active editor when closing editors to right
上级 911eabf3
......@@ -606,6 +606,10 @@ function registerCloseEditorCommands() {
.map(context => typeof context.editorIndex === 'number' ? group.getEditor(context.editorIndex) : group.activeEditor);
const editorsToClose = group.editors.filter(e => editors.indexOf(e) === -1);
if (group.activeEditor) {
group.pinEditor(group.activeEditor);
}
return group.closeEditors(editorsToClose);
}
......@@ -624,6 +628,10 @@ function registerCloseEditorCommands() {
const { group, editor } = resolveCommandsContext(editorGroupService, getCommandsContext(resourceOrContext, context));
if (group && editor) {
if (group.activeEditor) {
group.pinEditor(group.activeEditor);
}
return group.closeEditors({ direction: CloseDirection.RIGHT, except: editor });
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册