From 3e75957b245698729bda8227b6d72d1c5f0b66d0 Mon Sep 17 00:00:00 2001 From: BeniBenj Date: Sat, 5 Oct 2024 16:43:14 +0200 Subject: [PATCH 1/2] only use asyncfindprovider for file scheme --- src/vs/workbench/contrib/files/browser/views/explorerView.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/files/browser/views/explorerView.ts b/src/vs/workbench/contrib/files/browser/views/explorerView.ts index f42e1491142b9..91056da1e833a 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerView.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerView.ts @@ -555,6 +555,8 @@ export class ExplorerView extends ViewPane implements IExplorerView { const getFileNestingSettings = (item?: ExplorerItem) => this.configurationService.getValue({ resource: item?.root.resource }).explorer.fileNesting; + const rootsSupportFindProvider = this.explorerService.roots.every(root => root.resource.scheme === 'file'); + this.tree = >this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'FileExplorer', container, new ExplorerDelegate(), new ExplorerCompressionDelegate(), [this.renderer], this.instantiationService.createInstance(ExplorerDataSource, this.filter), { compressionEnabled: isCompressionEnabled(), @@ -602,7 +604,7 @@ export class ExplorerView extends ViewPane implements IExplorerView { }, paddingBottom: ExplorerDelegate.ITEM_HEIGHT, overrideStyles: this.getLocationBasedColors().listOverrideStyles, - findResultsProvider: this.instantiationService.createInstance(ExplorerFindProvider), + findResultsProvider: rootsSupportFindProvider ? this.instantiationService.createInstance(ExplorerFindProvider) : undefined, }); this._register(this.tree); this._register(this.themeService.onDidColorThemeChange(() => this.tree.rerender())); From 6a4da8ba4573ba1e3f1710d3bb7df90d59b81e5f Mon Sep 17 00:00:00 2001 From: BeniBenj Date: Tue, 8 Oct 2024 08:56:56 +0200 Subject: [PATCH 2/2] add vscode remote --- src/vs/workbench/contrib/files/browser/views/explorerView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/files/browser/views/explorerView.ts b/src/vs/workbench/contrib/files/browser/views/explorerView.ts index 91056da1e833a..650d060d8d4ad 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerView.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerView.ts @@ -59,6 +59,7 @@ import { basename, relativePath } from '../../../../../base/common/resources.js' import { IFilesConfigurationService } from '../../../../services/filesConfiguration/common/filesConfigurationService.js'; import { getExcludes, ISearchComplete, ISearchConfiguration, ISearchService, QueryType } from '../../../../services/search/common/search.js'; import { CancellationToken } from '../../../../../base/common/cancellation.js'; +import { Schemas } from '../../../../../base/common/network.js'; function hasExpandedRootChild(tree: WorkbenchCompressibleAsyncDataTree, treeInput: ExplorerItem[]): boolean { @@ -555,7 +556,7 @@ export class ExplorerView extends ViewPane implements IExplorerView { const getFileNestingSettings = (item?: ExplorerItem) => this.configurationService.getValue({ resource: item?.root.resource }).explorer.fileNesting; - const rootsSupportFindProvider = this.explorerService.roots.every(root => root.resource.scheme === 'file'); + const rootsSupportFindProvider = this.explorerService.roots.every(root => root.resource.scheme === Schemas.file || root.resource.scheme === Schemas.vscodeRemote); this.tree = >this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'FileExplorer', container, new ExplorerDelegate(), new ExplorerCompressionDelegate(), [this.renderer], this.instantiationService.createInstance(ExplorerDataSource, this.filter), {