Allow passing a handler function to context menu items
This commit is contained in:
parent
d3b976d044
commit
5521ff1b22
8 changed files with 137 additions and 78 deletions
|
@ -199,8 +199,8 @@ impl TerminalView {
|
|||
|
||||
pub fn deploy_context_menu(&mut self, action: &DeployContextMenu, cx: &mut ViewContext<Self>) {
|
||||
let menu_entries = vec![
|
||||
ContextMenuItem::item("Clear", Clear),
|
||||
ContextMenuItem::item("Close", pane::CloseActiveItem),
|
||||
ContextMenuItem::action("Clear", Clear),
|
||||
ContextMenuItem::action("Close", pane::CloseActiveItem),
|
||||
];
|
||||
|
||||
self.context_menu.update(cx, |menu, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue