If paths from edit steps omit worktree root, search worktrees for relative path (#15543)

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2024-07-31 17:55:11 +02:00
committed by GitHub
co-authored by Nathan
parent 3c404dec92
commit fef95110bb
2 changed files with 31 additions and 20 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ impl EditOperation {
let buffer = project
.update(&mut cx, |project, cx| {
let project_path = project
.project_path_for_full_path(Path::new(&path), cx)
.find_project_path(Path::new(&path), cx)
.with_context(|| format!("worktree not found for {:?}", path))?;
anyhow::Ok(project.open_buffer(project_path, cx))
})??