Skip to content

Seed "Find in files" from regular "find" input when focused (like VSPro) #78733

@gmathis

Description

@gmathis

A common workflow for me when a "find" operation in the current file doesn't turn up any results is to then search for the same term across all files.
This is trivial in VSPro, where hitting [Ctrl]-[Shift]-[F] at this point brings up "Find in files" with the same search terms as the "Find" dialog.

VSCode has an unfortunate behavior here that I thought was a bug for a long time.
When pressing [Ctrl]-[Shift]-[F] after a failed local find, the "Find in files" input is seeded with a truncated version of the search terms.
What's actually happening is that "Find in files" is being seeded not with the current "find" query, but with the selected text from the current document, which, since the find failed, represents only the longest matching prefix of the actual search terms.

While seeding "find in files" from the current document selection is desirable when focus is in the document, it would be much more useful, when focus is in the "find" popup, to seed "find in files" from the full search terms there instead.

Thanks for a great tool!

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiessearchSearch widget and operation issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions