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
parent 3c404dec92
commit fef95110bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 20 deletions

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))
})??