From aab1c592270e1fc325e3998ef7c0b6659cd10f37 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 10 Nov 2020 17:29:49 -0800 Subject: [PATCH] Use UriIdentityService for #110241 --- src/vs/workbench/contrib/search/common/searchModel.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 556d3d83b36..832f7bcf88d 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(); } -- GitLab