提交 1a60e57a 编写于 作者: B Benjamin Pasero

Infinite loop when closing several tabs (fixes #11394)

上级 f7287b54
......@@ -632,7 +632,13 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
// Thus we make the non-active one active and then close the others
else {
this.openEditor(except, null, this.stacks.positionOfGroup(group)).done(() => {
this.doCloseEditors(group, except, direction);
// since the opening might have failed, we have to check again for the active editor
// being the expected one, otherwise we end up in an endless loop trying to open the
// editor
if (except.matches(group.activeEditor)) {
this.doCloseEditors(group, except, direction);
}
}, errors.onUnexpectedError);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册