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' }, isCaseSensitive: { 'type': 'boolean' },
matchWholeWord: { 'type': 'boolean' }, matchWholeWord: { 'type': 'boolean' },
useExcludeSettingsAndIgnoreFiles: { 'type': 'boolean' }, useExcludeSettingsAndIgnoreFiles: { 'type': 'boolean' },
onlyOpenEditors: { 'type': 'boolean' },
} }
} }
}, },

View file

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

View file

@ -1240,6 +1240,9 @@ export class SearchView extends ViewPane {
if (typeof args.useExcludeSettingsAndIgnoreFiles === 'boolean') { if (typeof args.useExcludeSettingsAndIgnoreFiles === 'boolean') {
this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(args.useExcludeSettingsAndIgnoreFiles); 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 { toggleQueryDetails(moveFocus = true, show?: boolean, skipLayout?: boolean, reverse?: boolean): void {

View file

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