提交 ab0d7dc4 编写于 作者: I isidor

open editors: need to change input when number of groups changes

上级 81a77f7e
......@@ -135,7 +135,12 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
if (this.tree) {
// Show in tree
this.tree.refresh().done(null, errors.onUnexpectedError);
const treeInput = this.model.groups.length === 1 ? this.model.groups[0] : this.model;
if (treeInput !== this.tree.getInput()) {
this.tree.setInput(treeInput).done(null, errors.onUnexpectedError);
} else {
this.tree.refresh().done(null, errors.onUnexpectedError);
}
// Make sure to keep active editor input highlighted
if (this.model.activeGroup) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册