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.

menus: Add "Open File" action for Linux and Windows (#23707)

tims02af8dde1688
diff --git a/crates/zed/src/zed/app_menus.rs b/crates/zed/src/zed/app_menus.rs
index b3817f5578f..c50de09f3dd 100644
--- a/crates/zed/src/zed/app_menus.rs
+++ b/crates/zed/src/zed/app_menus.rs
@@ -53,7 +53,16 @@ pub fn app_menus() -> Vec<Menu> {
MenuItem::action("New", workspace::NewFile),
MenuItem::action("New Window", workspace::NewWindow),
MenuItem::separator(),
- MenuItem::action("Open…", workspace::Open),
+ #[cfg(not(target_os = "macos"))]
+ MenuItem::action("Open File...", workspace::OpenFiles),
+ MenuItem::action(
+ if cfg!(not(target_os = "macos")) {
+ "Open Folder..."
+ } else {
+ "Open…"
+ },
+ workspace::Open,
+ ),
MenuItem::action(
"Open Recent...",
zed_actions::OpenRecent {