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.

Add an action to reveal log file in system file manager (#40815)

Joseph T. Lyonsa398f80ba6dd
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index f3b7fea96d3..3dc3b781175 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -7015,7 +7015,9 @@ actions!(
zed,
[
/// Opens the Zed log file.
- OpenLog
+ OpenLog,
+ /// Reveals the Zed log file in the system file manager.
+ RevealLogInFileManager
]
);
diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs
index 62cf52de194..3cc6ec86473 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -178,6 +178,9 @@ pub fn init(cx: &mut App) {
open_log_file(workspace, window, cx);
});
});
+ cx.on_action(|_: &workspace::RevealLogInFileManager, cx| {
+ cx.reveal_path(paths::log_file().as_path());
+ });
cx.on_action(|_: &zed_actions::OpenLicenses, cx| {
with_active_or_new_workspace(cx, |workspace, window, cx| {
open_bundled_file(