Skip to content

Commit

Permalink
Improve cmd-click in terminal to find more paths (#26174)
Browse files Browse the repository at this point in the history
Closes #25701

Reworks the way cmd-click is handled:

* first, all worktree entries are checked for existence

This allows more fine-grained lookup of entries that are in the
worktree, but their path in the terminal is not "full": in case neither
`cwd` no worktree's root + that temrinal paths form a valid path
(#25701)

The worktrees are sorted by "the most close to cwd first" so such files
are attempted to resolved in the most specific worktree.

This also fixes no cmd-click working in the remote ssh.

* second, only if the client is local, do the FS checks to find
non-indexed files

Release Notes:

- Improved cmd-click in terminal to find more paths
  • Loading branch information
SomeoneToIgnore authored Mar 6, 2025
1 parent 43339c6 commit d3c6865
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 166 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/terminal_view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ futures.workspace = true
gpui.workspace = true
itertools.workspace = true
language.workspace = true
log.workspace = true
project.workspace = true
task.workspace = true
schemars.workspace = true
Expand All @@ -50,3 +51,6 @@ gpui = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
rand.workspace = true
workspace = { workspace = true, features = ["test-support"] }

[package.metadata.cargo-machete]
ignored = ["log"]
Loading

0 comments on commit d3c6865

Please sign in to comment.