Dispatch menu commands on the focused view

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-04-12 15:42:33 -07:00
co-authored by Nathan Sobo
parent d4436f3018
commit 902b0f7dfa
2 changed files with 37 additions and 34 deletions
+5 -5
View File
@@ -37,32 +37,32 @@ pub fn menus(settings: Receiver<Settings>) -> Vec<Menu<'static>> {
MenuItem::Action {
name: "Undo",
keystroke: Some("cmd-z"),
action: "editor:undo",
action: "buffer:undo",
arg: None,
},
MenuItem::Action {
name: "Redo",
keystroke: Some("cmd-Z"),
action: "editor:redo",
action: "buffer:redo",
arg: None,
},
MenuItem::Separator,
MenuItem::Action {
name: "Cut",
keystroke: Some("cmd-x"),
action: "editor:cut",
action: "buffer:cut",
arg: None,
},
MenuItem::Action {
name: "Copy",
keystroke: Some("cmd-c"),
action: "editor:copy",
action: "buffer:copy",
arg: None,
},
MenuItem::Action {
name: "Paste",
keystroke: Some("cmd-v"),
action: "editor:paste",
action: "buffer:paste",
arg: None,
},
],