Skip to content

Commit 7cf4cca

Browse files
committed
Fix slower search when query has a slash
Fix microsoft#76871
1 parent 9d555b1 commit 7cf4cca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/workbench/services/search/node/rawSearchService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export class SearchService implements IRawSearchService {
277277
for (const previousSearch in cache.resultsToSearchCache) {
278278
// If we narrow down, we might be able to reuse the cached results
279279
if (strings.startsWith(searchValue, previousSearch)) {
280-
if (hasPathSep && previousSearch.indexOf(sep) < 0) {
280+
if (hasPathSep && previousSearch.indexOf(sep) < 0 && previousSearch !== '') {
281281
continue; // since a path character widens the search for potential more matches, require it in previous search too
282282
}
283283

0 commit comments

Comments
 (0)