提交 e9f654c7 编写于 作者: J Johannes Rieken

don't rely on GIT path sorting, https://github.com/microsoft/vscode/issues/108292

上级 3ec9473a
......@@ -13,7 +13,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { ILogService } from 'vs/platform/log/common/log';
import { asArray, groupBy } from 'vs/base/common/arrays';
import { count } from 'vs/base/common/strings';
import { compare, count } from 'vs/base/common/strings';
import { dirname } from 'vs/base/common/path';
interface ProviderData {
......@@ -57,7 +57,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
// with parent folders
this._logService.warn('[Decorations] CAPPING events from decorations provider', extensionId.value, array.length);
const mapped = array.map(uri => ({ uri, rank: count(uri.path, '/') }));
const groups = groupBy(mapped, (a, b) => a.rank - b.rank);
const groups = groupBy(mapped, (a, b) => a.rank - b.rank || compare(a.uri.path, b.uri.path));
let picked: URI[] = [];
outer: for (let uris of groups) {
let lastDirname: string | undefined;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册