From 009af2025d95f064ddd64e39e7bbed0e9a02281e Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 3 Mar 2020 15:09:48 -0800 Subject: [PATCH] Add useDefaultExcludes property to findTextInFiles API Fix #85946 --- src/vs/vscode.proposed.d.ts | 11 ++++++++--- src/vs/workbench/api/common/extHostWorkspace.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index c5a0c707ce5d2..d4aca7a02202d 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -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 diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index 4b5c0c1301f54..60336a020672d 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -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,