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 authored and GitHub committed 2024-08-06 10:13:26 +02:00
1 parent 1fa39dd93c
commit b4c05cf92a
1 file changed
+2 -1
+2 -1
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))