# Improve multibuffer hints \(\#14690\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a2424638f5ba8f19eb3c82a8f164b3c8d571b80e

Requested commit: a2424638f5ba8f19eb3c82a8f164b3c8d571b80e

Commit: a2424638f5ba8f19eb3c82a8f164b3c8d571b80e

Tree: bc635bb27091e8d34ff7b06d2b5c1fcfa3601ad1

Author: Marshall Bowers

Committer: GitHub

## Message

```
Improve multibuffer hints (#14690)

This PR improves the multibuffer hints added in #14668 to fix a few
issues.

The original implementation relied on bailing out early in `render` by
returning an `Empty` element. However, this had the unintended
side-effect that when initially opening a multibuffer (such as the
project search) there would be additional whitespace increasing the
height of the toolbar due to the empty element.

The reason we were doing this in the first place was because the hints
weren't updating when the item's breadcrumbs changed.

We're able to address this properly by using a subscription to the
item's events and recompute the visibility of the hint when the active
item's breadcrumbs change.

This also has the benefit of making the hints re-appear right away when
running the `welcome: reset hints` command with a multibuffer open.

Release Notes:

- N/A
```

## Parents

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

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