Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an entry to the search history when the search is triggered by an option change #61993

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/vs/base/browser/ui/findinput/findInput.ts
Expand Up @@ -181,6 +181,10 @@ export class FindInput extends Widget {
}
}

public onSearchSubmit(): void {
this.inputBox.addToHistory();
}

public style(styles: IFindInputStyles): void {
this.inputActiveOptionBorder = styles.inputActiveOptionBorder;
this.inputBackground = styles.inputBackground;
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/parts/search/browser/searchView.ts
Expand Up @@ -1109,6 +1109,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
}

private onQueryTriggered(query: ITextQuery, options: ITextQueryBuilderOptions, excludePatternText: string, includePatternText: string): void {
this.searchWidget.searchInput.onSearchSubmit();
this.inputPatternExcludes.onSearchSubmit();
this.inputPatternIncludes.onSearchSubmit();

Expand Down