提交 297c44ee 编写于 作者: I Isidor Nikolic 提交者: GitHub

Merge pull request #34052 from forivall/fix-multi-root-order

Actually don't sort folders when they are all root folders
......@@ -549,7 +549,8 @@ export class FileSorter implements ISorter {
private sortOrder: SortOrder;
constructor(
@IConfigurationService private configurationService: IConfigurationService
@IConfigurationService private configurationService: IConfigurationService,
@IWorkspaceContextService private contextService: IWorkspaceContextService
) {
this.toDispose = [];
......@@ -570,6 +571,10 @@ export class FileSorter implements ISorter {
// Do not sort roots
if (statA.isRoot) {
if (statB.isRoot) {
const ws = this.contextService.getWorkspace();
return ws.roots.indexOf(statA.resource) - ws.roots.indexOf(statB.resource);
}
return -1;
}
if (statB.isRoot) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册