Skip to content

Commit

Permalink
Add useDefaultExcludes property to findTextInFiles API
Browse files Browse the repository at this point in the history
Fix #85946
  • Loading branch information
roblourens committed Mar 3, 2020
1 parent 17f797b commit 009af20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,10 +756,15 @@ declare module 'vscode' {

/**
* A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined` only default excludes will
* apply, when `null` no excludes will apply.
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
* apply.
*/
exclude?: GlobPattern | null;
exclude?: GlobPattern;

/**
* Whether to use the default and user-configured excludes. Defaults to true.
*/
useDefaultExcludes?: boolean;

/**
* The maximum number of results to search for
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/common/extHostWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
ignoreSymlinks: typeof options.followSymlinks === 'boolean' ? !options.followSymlinks : undefined,
disregardIgnoreFiles: typeof options.useIgnoreFiles === 'boolean' ? !options.useIgnoreFiles : undefined,
disregardGlobalIgnoreFiles: typeof options.useGlobalIgnoreFiles === 'boolean' ? !options.useGlobalIgnoreFiles : undefined,
disregardExcludeSettings: options.exclude === null,
disregardExcludeSettings: typeof options.useDefaultExcludes === 'boolean' ? !options.useDefaultExcludes : true,
fileEncoding: options.encoding,
maxResults: options.maxResults,
previewOptions,
Expand Down

0 comments on commit 009af20

Please sign in to comment.