# text_finder: Send selected word to text finder query \(\#59766\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/42a2eff274a269bb5f36078d31762ef4d87b0422)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 42a2eff274a269bb5f36078d31762ef4d87b0422

Requested commit: 42a2eff274a269bb5f36078d31762ef4d87b0422

Commit: 42a2eff274a269bb5f36078d31762ef4d87b0422

Tree: 186163606cdfb09c6135df6fc147f232f11c3779

Author: ozacod

Committer: GitHub

## Message

```
text_finder: Send selected word to text finder query (#59766)

## Objective

Make text finder match project search and buffer search by
pre-populating its query from the active editor according to
`seed_search_query_from_cursor`.

## Solution

- Seed text finder from the active editor's query suggestion when
opening it.
- Pass the seeded query into the picker and select the query text so
typing replaces it immediately.

## Testing

- Manually tested visually by opening text finder from an editor with a
selection and with the cursor on text, confirming the query is
pre-populated and selected.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:
- Improved text finder to seed its query from the active editor.

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
```

## Parents

- [eea5f57dc5a4638fc54eaa6e29b73662d64c0d94](https://git.cafe/gitcafe/zed/commit/eea5f57dc5a4638fc54eaa6e29b73662d64c0d94?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/42a2eff274a269bb5f36078d31762ef4d87b0422?format=markdown)
