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.

Do not push invisible local worktrees into recent documents (#10112)

Kirill Bulatov58aec1de7589
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs
index 9e1ac829646..cbabda7417a 100644
--- a/crates/project/src/project.rs
+++ b/crates/project/src/project.rs
@@ -6853,10 +6853,12 @@ impl Project {
project
.update(&mut cx, |project, cx| project.add_worktree(&worktree, cx))?;
- cx.update(|cx| {
- cx.add_recent_document(&path);
- })
- .log_err();
+ if visible {
+ cx.update(|cx| {
+ cx.add_recent_document(&path);
+ })
+ .log_err();
+ }
Ok(worktree)
}