mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Clean up excluding code-search results. Fixes #86195.
This commit is contained in:
parent
43b0b9a7d5
commit
0034c13dc2
|
@ -695,7 +695,7 @@ configurationRegistry.registerConfiguration({
|
|||
'search.exclude': {
|
||||
type: 'object',
|
||||
markdownDescription: nls.localize('exclude', "Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the `#files.exclude#` setting. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."),
|
||||
default: { '**/node_modules': true, '**/bower_components': true },
|
||||
default: { '**/node_modules': true, '**/bower_components': true, '**/*.code-search': true },
|
||||
additionalProperties: {
|
||||
anyOf: [
|
||||
{
|
||||
|
|
|
@ -982,11 +982,6 @@ export class SearchModel extends Disposable {
|
|||
search(query: ITextQuery, onProgress?: (result: ISearchProgressItem) => void): Promise<ISearchComplete> {
|
||||
this.cancelSearch();
|
||||
|
||||
// Exclude Search Editor results unless explicity included
|
||||
const searchEditorFilenameGlob = `**/*.code-search`;
|
||||
if (!query.includePattern || !query.includePattern[searchEditorFilenameGlob]) {
|
||||
query.excludePattern = { ...(query.excludePattern ?? {}), [searchEditorFilenameGlob]: true };
|
||||
}
|
||||
|
||||
this._searchQuery = query;
|
||||
if (!this.searchConfig.searchOnType) {
|
||||
|
|
Loading…
Reference in a new issue