@SomeoneToIgnore This code should 100% work for future Zed users, but for current Zed users, Zed's internal list of recents may not be synced w/ macOS' Recent Documents at first. If needed this can be fixed by calling `cx.refresh_recent_documents` on startup, but that feels a bit unnecessary. Release Notes: - Fixes behavior of Recent Documents list on macOS
This commit is contained in:
@@ -6749,6 +6749,12 @@ impl Project {
|
||||
let worktree = worktree?;
|
||||
project
|
||||
.update(&mut cx, |project, cx| project.add_worktree(&worktree, cx))?;
|
||||
|
||||
cx.update(|cx| {
|
||||
cx.add_recent_document(&path);
|
||||
})
|
||||
.log_err();
|
||||
|
||||
Ok(worktree)
|
||||
}
|
||||
.map_err(Arc::new)
|
||||
|
||||
Reference in New Issue
Block a user