Skip to content

Commit 3c2fa74

Browse files
authored
Use system and generated isfs URL parameters in TextSearchProvider (#863)
1 parent 24de768 commit 3c2fa74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/providers/FileSystemProvider/TextSearchProvider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as vscode from "vscode";
2+
import * as url from "url";
23
import { SearchResult, SearchMatch } from "../../api/atelier";
34
import { AtelierAPI } from "../../api";
45
import { DocumentContentProvider } from "../DocumentContentProvider";
@@ -47,13 +48,18 @@ export class TextSearchProvider implements vscode.TextSearchProvider {
4748
if (token.isCancellationRequested) {
4849
return;
4950
}
51+
const queryParams = url.parse(options.folder.toString(true), true).query;
52+
const sysStr = queryParams.system && queryParams.system.length ? queryParams.system.toString() : "0";
53+
const genStr = queryParams.generated && queryParams.generated.length ? queryParams.generated.toString() : "0";
5054
return api
5155
.actionSearch({
5256
query: query.pattern,
5357
regex: query.isRegExp,
5458
word: query.isWordMatch,
5559
case: query.isCaseSensitive,
5660
files: fileSpecFromURI(options.folder),
61+
sys: sysStr === "1" || (sysStr === "0" && api.ns === "%SYS"),
62+
gen: genStr === "1",
5763
// If options.maxResults is null the search is supposed to return an unlimited number of results
5864
// Since there's no way for us to pass "unlimited" to the server, I chose a very large number
5965
max: options.maxResults ?? 100000,

0 commit comments

Comments
 (0)