This commit is contained in:
Rob Lourens 2021-07-16 13:30:50 -07:00
parent 92f692d4a3
commit 08e5cccb11
4 changed files with 7 additions and 0 deletions

View file

@ -705,6 +705,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
isCaseSensitive: { 'type': 'boolean' },
matchWholeWord: { 'type': 'boolean' },
useExcludeSettingsAndIgnoreFiles: { 'type': 'boolean' },
onlyOpenEditors: { 'type': 'boolean' },
}
}
},

View file

@ -172,6 +172,7 @@ export interface IFindInFilesArgs {
isCaseSensitive?: boolean;
matchWholeWord?: boolean;
useExcludeSettingsAndIgnoreFiles?: boolean;
onlyOpenEditors?: boolean;
}
export const FindInFilesCommand: ICommandHandler = (accessor, args: IFindInFilesArgs = {}) => {
const searchConfig = accessor.get(IConfigurationService).getValue<ISearchConfiguration>().search;
@ -201,6 +202,7 @@ export const FindInFilesCommand: ICommandHandler = (accessor, args: IFindInFiles
isCaseSensitive: args.isCaseSensitive,
isRegexp: args.isRegex,
useExcludeSettingsAndIgnoreFiles: args.useExcludeSettingsAndIgnoreFiles,
onlyOpenEditors: args.onlyOpenEditors,
showIncludesExcludes: !!(args.filesToExclude || args.filesToExclude || !args.useExcludeSettingsAndIgnoreFiles),
});
accessor.get(ICommandService).executeCommand(OpenEditorCommandId, convertArgs(args));

View file

@ -1240,6 +1240,9 @@ export class SearchView extends ViewPane {
if (typeof args.useExcludeSettingsAndIgnoreFiles === 'boolean') {
this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(args.useExcludeSettingsAndIgnoreFiles);
}
if (typeof args.onlyOpenEditors === 'boolean') {
this.searchIncludePattern.setOnlySearchInOpenEditors(args.onlyOpenEditors);
}
}
toggleQueryDetails(moveFocus = true, show?: boolean, skipLayout?: boolean, reverse?: boolean): void {

View file

@ -217,6 +217,7 @@ const openArgDescription = {
showIncludesExcludes: { type: 'boolean' },
triggerSearch: { type: 'boolean' },
focusResults: { type: 'boolean' },
onlyOpenEditors: { type: 'boolean' },
}
}
}]