Show action key bindings in context menus

This commit is contained in:
Max Brunsfeld 2023-11-28 16:07:42 -08:00
parent bcf449d3fe
commit 6bf7ad71eb
3 changed files with 49 additions and 27 deletions

View file

@ -298,9 +298,12 @@ impl TerminalView {
position: gpui::Point<Pixels>,
cx: &mut ViewContext<Self>,
) {
self.context_menu = Some(ContextMenu::build(cx, |menu, _| {
menu.action("Clear", Box::new(Clear))
.action("Close", Box::new(CloseActiveItem { save_intent: None }))
self.context_menu = Some(ContextMenu::build(cx, |menu, cx| {
menu.action("Clear", Box::new(Clear), cx).action(
"Close",
Box::new(CloseActiveItem { save_intent: None }),
cx,
)
}));
dbg!(&position);
// todo!()