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

Recent change to searching makes it way too aggressive #88159

Closed
akbyrd opened this issue Jan 6, 2020 · 4 comments
Closed

Recent change to searching makes it way too aggressive #88159

akbyrd opened this issue Jan 6, 2020 · 4 comments
Assignees
Labels
search Search widget and operation issues
Milestone

Comments

@akbyrd
Copy link
Contributor

akbyrd commented Jan 6, 2020

Issue Type: Bug

A recent update changed the behavior of workbench.action.findInFiles in an extremely undesirable way for me. Like, constant source of frustration throughout my day kind of way.

Previously, triggering search would open the panel and seed the search box with any text I had selected, but it wouldn't actually run the search. Since I think 1.40 or 1.41 invoking workbench.action.findInFiles both seeds the search text and begins an actual search. This happens despite setting "search.searchOnType": false. The only way I've found to stop this auto-search behavior is to set "editor.find.seedSearchStringFromSelection": false, but that's an undesirable workaround.

The reason this is such a big issue for me is that it ends up constantly re-running the search. In the large codebase I work in most often this takes about 2 seconds and ends up happening after every search result I look at.

My workflow looks like this:

  • Invoke workbench.action.findInFiles to begin a search
  • Type some text and hit enter
  • Select a result and press enter
  • Look at the opened editor
  • Invoke workbench.action.findInFiles to return focus to search
  • Select a different result and press enter
  • repeat

The problem is with return focus to search. Since selecting a search result opens an editor with the matching text selected then if I don't clear the selection before invoking workbench.action.findInFiles is starts a brand new search. This means I have to wait for the search to complete, and worse, it blows up the tree view where I had collapsed some files that I'd finished inspecting.

VS Code version: Code 1.41.1 (26076a4, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.17763

@vscodebot vscodebot bot added the search Search widget and operation issues label Jan 6, 2020
@roblourens roblourens assigned JacksonKearl and unassigned roblourens Jan 6, 2020
@roblourens
Copy link
Member

@JacksonKearl, disabling searchOnType should also prevent the search from running in this case

@roblourens
Copy link
Member

Remember to assign to the milestone for verification :)

@JacksonKearl JacksonKearl added this to the January 2020 milestone Jan 6, 2020
@fakhamatia
Copy link

How can I fix this?
I want: select string and hit ctrl+F and find it on the current page.
I don't want: select string and click the search icon and VSCode automatic search string.

I use "editor.find.seedSearchStringFromSelection": false but i must copy string and hit ctrl+F and
paste string to search in current page.

@JacksonKearl
Copy link
Contributor

@fakhamatia see #90962.

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

4 participants