Skip to content

Commit d7c7d5b

Browse files
authored
Use async find provider for file scheme only (#232373)
Use async find provider only for file scheme (#230592) * only use asyncfindprovider for file scheme * add vscode remote
1 parent 3cb9832 commit d7c7d5b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/contrib/files/browser/views/explorerView.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import { basename, relativePath } from '../../../../../base/common/resources.js'
5959
import { IFilesConfigurationService } from '../../../../services/filesConfiguration/common/filesConfigurationService.js';
6060
import { getExcludes, ISearchComplete, ISearchConfiguration, ISearchService, QueryType } from '../../../../services/search/common/search.js';
6161
import { CancellationToken } from '../../../../../base/common/cancellation.js';
62+
import { Schemas } from '../../../../../base/common/network.js';
6263

6364

6465
function hasExpandedRootChild(tree: WorkbenchCompressibleAsyncDataTree<ExplorerItem | ExplorerItem[], ExplorerItem, FuzzyScore>, treeInput: ExplorerItem[]): boolean {
@@ -559,6 +560,8 @@ export class ExplorerView extends ViewPane implements IExplorerView {
559560

560561
const getFileNestingSettings = (item?: ExplorerItem) => this.configurationService.getValue<IFilesConfiguration>({ resource: item?.root.resource }).explorer.fileNesting;
561562

563+
const rootsSupportFindProvider = this.explorerService.roots.every(root => root.resource.scheme === Schemas.file || root.resource.scheme === Schemas.vscodeRemote);
564+
562565
this.tree = <WorkbenchCompressibleAsyncDataTree<ExplorerItem | ExplorerItem[], ExplorerItem, FuzzyScore>>this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'FileExplorer', container, new ExplorerDelegate(), new ExplorerCompressionDelegate(), [this.renderer],
563566
this.instantiationService.createInstance(ExplorerDataSource, this.filter), {
564567
compressionEnabled: isCompressionEnabled(),
@@ -606,7 +609,7 @@ export class ExplorerView extends ViewPane implements IExplorerView {
606609
},
607610
paddingBottom: ExplorerDelegate.ITEM_HEIGHT,
608611
overrideStyles: this.getLocationBasedColors().listOverrideStyles,
609-
findResultsProvider: this.instantiationService.createInstance(ExplorerFindProvider),
612+
findResultsProvider: rootsSupportFindProvider ? this.instantiationService.createInstance(ExplorerFindProvider) : undefined,
610613
});
611614
this._register(this.tree);
612615
this._register(this.themeService.onDidColorThemeChange(() => this.tree.rerender()));

0 commit comments

Comments
 (0)