Add showIncludesExcludes in IFindInFilesArgs (#212347)

* Add showIncludesExcludes in IFindInFilesArgs

* 💄
This commit is contained in:
xiejialong 2024-06-01 02:26:51 +08:00 committed by GitHub
parent df299ea07b
commit c0f4f7b942
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,7 @@ export interface IFindInFilesArgs {
matchWholeWord?: boolean; matchWholeWord?: boolean;
useExcludeSettingsAndIgnoreFiles?: boolean; useExcludeSettingsAndIgnoreFiles?: boolean;
onlyOpenEditors?: boolean; onlyOpenEditors?: boolean;
showIncludesExcludes?: boolean;
} }
//#endregion //#endregion
@ -208,6 +209,7 @@ registerAction2(class FindInFilesAction extends Action2 {
matchWholeWord: { 'type': 'boolean' }, matchWholeWord: { 'type': 'boolean' },
useExcludeSettingsAndIgnoreFiles: { 'type': 'boolean' }, useExcludeSettingsAndIgnoreFiles: { 'type': 'boolean' },
onlyOpenEditors: { 'type': 'boolean' }, onlyOpenEditors: { 'type': 'boolean' },
showIncludesExcludes: { 'type': 'boolean' }
} }
} }
}, },
@ -407,6 +409,9 @@ export async function findInFilesCommand(accessor: ServicesAccessor, _args: IFin
updatedText = openedView.updateTextFromFindWidgetOrSelection({ allowUnselectedWord: typeof args.replace !== 'string' }); updatedText = openedView.updateTextFromFindWidgetOrSelection({ allowUnselectedWord: typeof args.replace !== 'string' });
} }
openedView.setSearchParameters(args); openedView.setSearchParameters(args);
if (typeof args.showIncludesExcludes === 'boolean') {
openedView.toggleQueryDetails(false, args.showIncludesExcludes);
}
openedView.searchAndReplaceWidget.focus(undefined, updatedText, updatedText); openedView.searchAndReplaceWidget.focus(undefined, updatedText, updatedText);
} }