Do not push invisible local worktrees into recent documents (#10112)
Follow-up of https://github.com/zed-industries/zed/pull/9919 that removes invisible worktrees from the list, to avoid things like  Release Notes: - N/A
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user