# terminal_view: Show terminal inline assist keybinding in tooltip \(\#55903\) · gitcafe/zed

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

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

Visibility: public

Requested revision: be7e5b0338dbb49170913ba539c4e743d9d071f4

Requested commit: be7e5b0338dbb49170913ba539c4e743d9d071f4

Commit: be7e5b0338dbb49170913ba539c4e743d9d071f4

Tree: ab0a6d210a44317b271fde245eb569a4bf9311c7

Author: di404

Committer: GitHub

## Message

```
terminal_view: Show terminal inline assist keybinding in tooltip (#55903)

## Summary

- Fixed the terminal inline assist tab bar tooltip so it resolves the
keybinding from the active terminal view.
- The bug happened when the initial terminal was closed and a new
terminal was opened: the tab bar button kept a cached focus handle for
the old terminal, so tooltip keybinding lookup could no longer find the
terminal key context.
- The button is now created while rendering the tab bar with the current
terminal view's focus handle, avoiding stale focus handles as terminals
are closed and recreated.

## Validation

- `cargo fmt --package terminal_view --check`
- `cargo check -p terminal_view --message-format short`

Release Notes:

- Fixed the terminal inline assist toolbar tooltip not showing its
keybinding after reopening terminals.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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