# buffer_search: Discard empty search suggestions\. \(\#3136\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 99121ad5cd5cb2debded3a9029383688d270d04c

Requested commit: 99121ad5cd5cb2debded3a9029383688d270d04c

Commit: 99121ad5cd5cb2debded3a9029383688d270d04c

Tree: 9ddf28b336fc2479f6f88f33de430e05f3eea31c

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
buffer_search: Discard empty search suggestions. (#3136)

Now when buffer_search::Deploy action is triggered (with cmd-f), we'll
keep the previous query in query_editor (if there was one) instead of
replacing it with empty query.

This addresses this bit of feedback from Jose:
> If no text is selected, `cmd + f` should not delete the text in the
search bar when refocusing

Release Notes:
- Improved buffer search by not clearing out query editor when no text
is selected and "buffer search: deploy" (default keybind: cmd-f) is
triggered.
```

## Parents

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

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