diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 556d3d83b36db89ffaefeacab96ac2c857472bcf..832f7bcf88d2933c4d72e273c8349ab518cf5588 100644 --- a/src/vs/workbench/contrib/search/common/searchModel.ts +++ b/src/vs/workbench/contrib/search/common/searchModel.ts @@ -31,6 +31,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { compareFileNames, compareFileExtensions, comparePaths } from 'vs/base/common/comparers'; import { IFileService, IFileStatWithMetadata } from 'vs/platform/files/common/files'; import { Schemas } from 'vs/base/common/network'; +import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity'; export class Match { @@ -710,7 +711,7 @@ export class SearchResult extends Disposable { private _folderMatches: FolderMatchWithResource[] = []; private _otherFilesMatch: FolderMatch | null = null; - private _folderMatchesMap: TernarySearchTree = TernarySearchTree.forUris(); + private _folderMatchesMap: TernarySearchTree = TernarySearchTree.forUris2(key => this.uriIdentityService.extUri.ignorePathCasing(key)); private _showHighlights: boolean = false; private _query: ITextQuery | null = null; @@ -725,6 +726,7 @@ export class SearchResult extends Disposable { @ITelemetryService private readonly telemetryService: ITelemetryService, @IInstantiationService private readonly instantiationService: IInstantiationService, @IModelService private readonly modelService: IModelService, + @IUriIdentityService private readonly uriIdentityService: IUriIdentityService, ) { super(); this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations); @@ -755,7 +757,7 @@ export class SearchResult extends Disposable { .then(() => this._isDirty = false); this._rangeHighlightDecorations.removeHighlightRange(); - this._folderMatchesMap = TernarySearchTree.forUris(); + this._folderMatchesMap = TernarySearchTree.forUris2(key => this.uriIdentityService.extUri.ignorePathCasing(key)); if (!query) { return; @@ -977,7 +979,7 @@ export class SearchResult extends Disposable { private disposeMatches(): void { this.folderMatches().forEach(folderMatch => folderMatch.dispose()); this._folderMatches = []; - this._folderMatchesMap = TernarySearchTree.forUris(); + this._folderMatchesMap = TernarySearchTree.forUris2(key => this.uriIdentityService.extUri.ignorePathCasing(key)); this._rangeHighlightDecorations.removeHighlightRange(); }