# Properly handle goto single file worktrees during terminal cmd-clicks \(\#26582\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5268e7431513b5fdcb5e65272d11db1aee683361)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5268e7431513b5fdcb5e65272d11db1aee683361

Requested commit: 5268e7431513b5fdcb5e65272d11db1aee683361

Commit: 5268e7431513b5fdcb5e65272d11db1aee683361

Tree: 861aded920ce4b6f306071a5c6f7df470691b52e

Author: Kirill Bulatov

Committer: GitHub

## Message

```
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
```

## Parents

- [91c209900b69c785bd85726637819fd3cc9dba78](https://git.cafe/gitcafe/zed/commit/91c209900b69c785bd85726637819fd3cc9dba78?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5268e7431513b5fdcb5e65272d11db1aee683361?format=markdown)
