mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Open a window with an empty buffer when launching zed with no args
This commit is contained in:
parent
058691d2b2
commit
c4dac3c6b1
1 changed files with 5 additions and 6 deletions
|
@ -15,7 +15,7 @@ use zed::{
|
|||
fs::RealFs,
|
||||
language, menus, rpc, settings, theme_selector,
|
||||
user::UserStore,
|
||||
workspace::{self, OpenParams, OpenPaths},
|
||||
workspace::{self, OpenNew, OpenParams, OpenPaths},
|
||||
AppState,
|
||||
};
|
||||
|
||||
|
@ -62,11 +62,10 @@ fn main() {
|
|||
}
|
||||
|
||||
let paths = collect_path_args();
|
||||
if !paths.is_empty() {
|
||||
cx.dispatch_global_action(OpenPaths(OpenParams {
|
||||
paths,
|
||||
app_state: app_state.clone(),
|
||||
}));
|
||||
if paths.is_empty() {
|
||||
cx.dispatch_global_action(OpenNew(app_state));
|
||||
} else {
|
||||
cx.dispatch_global_action(OpenPaths(OpenParams { paths, app_state }));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue