From f503c65924fff9799b359b6c83994b2eaf7af7c8 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 27 Oct 2025 13:33:50 +0200 Subject: [PATCH] Make "About Zed" menu entry to work when all Zed windows are closed (#41272) Closes https://github.com/zed-industries/zed/issues/41267 The only downside would be the fact that a Zed window will appear behing the version modal, but this is a limitation for all "window-less" actions currently. Release Notes: - Made "About Zed" menu entry to work when all Zed windows are closed --- crates/zed/src/zed.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 010210f740fbd6559c8385df17a64e227dd19c50..cc2906adfc0f1d8e3a78423e69b93e5ee5909da0 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -266,6 +266,11 @@ pub fn init(cx: &mut App) { ); }); }); + cx.on_action(|_: &zed_actions::About, cx| { + with_active_or_new_workspace(cx, |workspace, window, cx| { + about(workspace, window, cx); + }); + }); } fn bind_on_window_closed(cx: &mut App) -> Option { @@ -693,7 +698,6 @@ fn register_actions( cx: &mut Context, ) { workspace - .register_action(about) .register_action(|_, _: &OpenDocs, _, cx| cx.open_url(DOCS_URL)) .register_action(|_, _: &Minimize, window, _| { window.minimize_window(); @@ -1081,12 +1085,7 @@ fn initialize_pane( }); } -fn about( - _: &mut Workspace, - _: &zed_actions::About, - window: &mut Window, - cx: &mut Context, -) { +fn about(_: &mut Workspace, window: &mut Window, cx: &mut Context) { let release_channel = ReleaseChannel::global(cx).display_name(); let version = env!("CARGO_PKG_VERSION"); let debug = if cfg!(debug_assertions) {