terminal: Fix context menu keybindings flicker (#15771)

Fixes https://github.com/zed-industries/zed/issues/15156


[Screencast_20240804_112659.webm](https://github.com/user-attachments/assets/d6d15e65-ece2-4342-b2ca-55e3737a4736)

Release Notes:

- N/A
This commit is contained in:
apricotbucket28 2024-08-06 05:13:26 -03:00 committed by GitHub
parent 1f97741067
commit 82db5dedfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -211,7 +211,8 @@ impl TerminalView {
cx: &mut ViewContext<Self>,
) {
let context_menu = ContextMenu::build(cx, |menu, _| {
menu.action("New Terminal", Box::new(NewTerminal))
menu.context(self.focus_handle.clone())
.action("New Terminal", Box::new(NewTerminal))
.separator()
.action("Copy", Box::new(Copy))
.action("Paste", Box::new(Paste))