提交 be27fd61 编写于 作者: I isidor

Open editors: only reveal the element if it is not visible

fixes #8279
上级 cc31e2e5
...@@ -190,7 +190,11 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { ...@@ -190,7 +190,11 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
if (openEditor) { if (openEditor) {
this.tree.setFocus(openEditor); this.tree.setFocus(openEditor);
this.tree.setSelection([openEditor]); this.tree.setSelection([openEditor]);
this.tree.reveal(openEditor).done(null, errors.onUnexpectedError); const relativeTop = this.tree.getRelativeTop(openEditor);
if (relativeTop <= 0 || relativeTop >= 1) {
// Only reveal the element if it is not visible #8279
this.tree.reveal(openEditor).done(null, errors.onUnexpectedError);
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册