未验证 提交 6f6b434c 编写于 作者: I Isidor Nikolic 提交者: GitHub

Merge pull request #73466 from microsoft/isidorn/closestRoot

explorer: take the root that is the closest to the stat
......@@ -511,8 +511,10 @@ export class ExplorerView extends ViewletPanel {
return;
}
// Expand all stats in the parent chain
let item: ExplorerItem | undefined = this.explorerService.roots.filter(i => isEqualOrParent(resource, i.resource))[0];
// Expand all stats in the parent chain.
let item: ExplorerItem | undefined = this.explorerService.roots.filter(i => isEqualOrParent(resource, i.resource))
// Take the root that is the closest to the stat #72299
.sort((first, second) => second.resource.path.length - first.resource.path.length)[0];
while (item && item.resource.toString() !== resource.toString()) {
await this.tree.expand(item);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册