mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-12 05:27:07 +00:00
Wire up NewWindow
action
This commit is contained in:
parent
d8757845a9
commit
ed31d36ac1
1 changed files with 9 additions and 0 deletions
|
@ -431,6 +431,15 @@ pub fn init(cx: &mut AppContext) {
|
|||
.detach();
|
||||
}
|
||||
});
|
||||
cx.on_action(move |_: &workspace::NewWindow, cx| {
|
||||
let app_state = cx.global::<Weak<workspace::AppState>>();
|
||||
if let Some(app_state) = app_state.upgrade() {
|
||||
workspace::open_new(&app_state, cx, |workspace, cx| {
|
||||
Editor::new_file(workspace, &Default::default(), cx)
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
trait InvalidationRegion {
|
||||
|
|
Loading…
Reference in a new issue