mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Fix error when running workspace:open command
This commit is contained in:
parent
ff2ab4b72d
commit
f87aa14ebf
2 changed files with 4 additions and 5 deletions
|
@ -25,7 +25,7 @@ fn main() {
|
||||||
};
|
};
|
||||||
|
|
||||||
app.run(move |cx| {
|
app.run(move |cx| {
|
||||||
cx.set_menus(menus::menus(app_state.settings.clone()));
|
cx.set_menus(menus::menus(app_state.clone()));
|
||||||
workspace::init(cx);
|
workspace::init(cx);
|
||||||
editor::init(cx);
|
editor::init(cx);
|
||||||
file_finder::init(cx);
|
file_finder::init(cx);
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use crate::settings::Settings;
|
use crate::AppState;
|
||||||
use gpui::{Menu, MenuItem};
|
use gpui::{Menu, MenuItem};
|
||||||
use postage::watch;
|
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
pub fn menus(settings: watch::Receiver<Settings>) -> Vec<Menu<'static>> {
|
pub fn menus(state: AppState) -> Vec<Menu<'static>> {
|
||||||
vec![
|
vec![
|
||||||
Menu {
|
Menu {
|
||||||
name: "Zed",
|
name: "Zed",
|
||||||
|
@ -37,7 +36,7 @@ pub fn menus(settings: watch::Receiver<Settings>) -> Vec<Menu<'static>> {
|
||||||
name: "Open…",
|
name: "Open…",
|
||||||
keystroke: Some("cmd-o"),
|
keystroke: Some("cmd-o"),
|
||||||
action: "workspace:open",
|
action: "workspace:open",
|
||||||
arg: Some(Box::new(settings)),
|
arg: Some(Box::new(state)),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue