Skip to content

Commit

Permalink
Quick search should select the term when it's auto filled (#197020)
Browse files Browse the repository at this point in the history
Fixes #195180
  • Loading branch information
andreamah authored Oct 30, 2023
1 parent d95f7c9 commit d0cdbac
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export class TextSearchQuickAccess extends PickerQuickAccessProvider<IPickerQuic

override provide(picker: IQuickPick<IPickerQuickAccessItem>, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): IDisposable {
const disposables = new DisposableStore();
if (TEXT_SEARCH_QUICK_ACCESS_PREFIX.length < picker.value.length) {
picker.valueSelection = [TEXT_SEARCH_QUICK_ACCESS_PREFIX.length, picker.value.length];
}
disposables.add(super.provide(picker, token, runOptions));
disposables.add(picker.onDidHide(() => this.searchModel.searchResult.toggleHighlights(false)));
disposables.add(picker.onDidAccept(() => this.searchModel.searchResult.toggleHighlights(false)));
Expand Down

0 comments on commit d0cdbac

Please sign in to comment.