Skip to content

Commit 86571ec

Browse files
committed
Fix results lost from FileSearchProvider when maxResults is returned
1 parent 5562872 commit 86571ec

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export interface IDirectoryTree {
3333
pathToEntries: { [relativePath: string]: IDirectoryEntry[] };
3434
}
3535

36-
3736
class FileSearchEngine {
3837
private filePattern?: string;
3938
private includePattern?: glob.ParsedExpression;
@@ -132,7 +131,7 @@ class FileSearchEngine {
132131
const providerTime = providerSW.elapsed();
133132
const postProcessSW = StopWatch.create();
134133

135-
if (this.isCanceled) {
134+
if (this.isCanceled && !this.isLimitHit) {
136135
return null;
137136
}
138137

@@ -153,7 +152,7 @@ class FileSearchEngine {
153152
}
154153

155154
this.activeCancellationTokens.delete(cancellation);
156-
if (this.isCanceled) {
155+
if (this.isCanceled && !this.isLimitHit) {
157156
return null;
158157
}
159158

0 commit comments

Comments
 (0)