Skip to content

Commit 0d9d41e

Browse files
committed
Pass options.maxResults to the server
1 parent 2950d17 commit 0d9d41e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/providers/FileSystemProvider/TextSearchProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export class TextSearchProvider implements vscode.TextSearchProvider {
2929
regex: query.isRegExp,
3030
word: query.isWordMatch,
3131
case: query.isCaseSensitive,
32+
// If options.maxResults is null the search is supposed to return an unlimited number of results
33+
// Since there's no way for us to pass "unlimited" to the server, I choose a very large number
34+
max: options.maxResults !== null ? options.maxResults : 100000,
3235
})
3336
.then((data) => data.result)
3437
.then((files: SearchResult[]) =>

0 commit comments

Comments
 (0)