Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Renamed open recent action to match menu

Mikayla Makica2e0256e1f1
diff --git a/assets/keymaps/default.json b/assets/keymaps/default.json
index a0f437cf918..ea8c3414612 100644
--- a/assets/keymaps/default.json
+++ b/assets/keymaps/default.json
@@ -38,7 +38,7 @@
"cmd-n": "workspace::NewFile",
"cmd-shift-n": "workspace::NewWindow",
"cmd-o": "workspace::Open",
- "alt-cmd-o": "recent_projects::Toggle",
+ "alt-cmd-o": "projects::OpenRecent",
"ctrl-`": "workspace::NewTerminal"
}
},
diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs
index 02e15290ab2..d7de7ae718b 100644
--- a/crates/recent_projects/src/recent_projects.rs
+++ b/crates/recent_projects/src/recent_projects.rs
@@ -13,7 +13,7 @@ use picker::{Picker, PickerDelegate};
use settings::Settings;
use workspace::{OpenPaths, Workspace, WorkspaceLocation, WORKSPACE_DB};
-actions!(recent_projects, [Toggle]);
+actions!(projects, [OpenRecent]);
pub fn init(cx: &mut MutableAppContext) {
cx.add_action(RecentProjectsView::toggle);
@@ -40,7 +40,7 @@ impl RecentProjectsView {
}
}
- fn toggle(_: &mut Workspace, _: &Toggle, cx: &mut ViewContext<Workspace>) {
+ fn toggle(_: &mut Workspace, _: &OpenRecent, cx: &mut ViewContext<Workspace>) {
cx.spawn(|workspace, mut cx| async move {
let workspace_locations = cx
.background()
diff --git a/crates/zed/src/menus.rs b/crates/zed/src/menus.rs
index 85ab62af733..d2385149175 100644
--- a/crates/zed/src/menus.rs
+++ b/crates/zed/src/menus.rs
@@ -81,7 +81,7 @@ pub fn menus() -> Vec<Menu<'static>> {
},
MenuItem::Action {
name: "Open Recent...",
- action: Box::new(recent_projects::Toggle),
+ action: Box::new(recent_projects::OpenRecent),
},
MenuItem::Separator,
MenuItem::Action {