Properly handle goto single file worktrees during terminal cmd-clicks (cherry-pick #26582) (#26651)
gcp-cherry-pick-bot[bot]
and
Kirill Bulatov
created
Cherry-picked Properly handle goto single file worktrees during terminal
cmd-clicks (#26582)
Closes https://github.com/zed-industries/zed/issues/26431
Follow-up of https://github.com/zed-industries/zed/pull/26174
`path_with_position.path.strip_prefix(&worktree_root)` used in the PR is
wrong for cases of single-file worktrees, where it will return empty
paths that will result in incorrect project and FS entries accessed.
Release Notes:
- Fixed goto single file worktrees during terminal cmd-clicks
Co-authored-by: Kirill Bulatov <kirill@zed.dev>