Skip to content

Search history pollution with search.searchOnType enabled #86288

@IllusionMH

Description

@IllusionMH

With current implementation of search history it's a bit hard to find previous "proper" searches when search.searchOnType is true.

When used with regular expressions which are not as fast to type as regular text it allows to quickly see RE errors or preliminary results but also saves each a lot of version with only 1-3 changed characters to history. Without better options to navigate field history except Up/Down it makes hard to find history entry for intentional searches (in my case it was about 20 intermediate results to spot proper search).

Current solutions are:

  1. Disable search.searchOnType and then only "submitted" searches will be in history.
  2. Increase search.searchOnTypeDebouncePeriod to 2s and hope that I can type all capturing groups and lookaheads fast enough, but it might be faster just to hit Enter

As for me - ideal solution will be an option to treat searches triggered by search.searchOnType as early preview of possible matches and add history entry only after user intentionally hits Enter.

Is it something that can be implemented and considered by the team?

/cc @JacksonKearl

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugsearchSearch widget and operation issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions