Skip to content

Commit

Permalink
Fix #85915 - don't search open editors from git
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Dec 2, 2019
1 parent e63912b commit 293cabc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vs/workbench/services/search/common/searchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ export class SearchService extends Disposable implements ISearchService {
return;
}

// Exclude files from the git FileSystemProvider, e.g. to prevent open staged files from showing in search results
if (resource.scheme === 'gitfs') {
return;
}

if (!this.matches(resource, query)) {
return; // respect user filters
}
Expand Down

0 comments on commit 293cabc

Please sign in to comment.