Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal file paths cannot be clicked when column portion of path is malformed #10688

Closed
1 task done
pedrorolo opened this issue Apr 17, 2024 · 5 comments · Fixed by #10691
Closed
1 task done

Terminal file paths cannot be clicked when column portion of path is malformed #10688

pedrorolo opened this issue Apr 17, 2024 · 5 comments · Fixed by #10691
Labels
defect [core label] mouse interaction Feedback for mouse interaction states, actions, etc terminal Feedback for terminal integration, shell commands, etc

Comments

@pedrorolo
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

  • Create a task that prints out a file path
  • run the task
  • try to open the file by clicking or cmd clicking the file path

Environment

Zed: v0.130.7 (Zed)
OS: macOS 14.4.1
Memory: 8 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@pedrorolo pedrorolo added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Apr 17, 2024
@osiewicz
Copy link
Contributor

osiewicz commented Apr 17, 2024

Hey, thanks for filling in this bug report. Do you have an example output we could use to verify it on our side? As far as I can tell, output of something likepwd is clickable.
If you run the task directly in the terminal instead, is the output not clickable as well?

@pedrorolo
Copy link
Author

     NoMethodError:
       undefined method `method_name' for nil:NilClass
     # ./filename.rb:37:in `method_name'

@osiewicz
Copy link
Contributor

osiewicz commented Apr 17, 2024

Hm, the following works fine for me:
echo " # ./crates/terminal/src/terminal.rs:39: in method_name"
I believe the problem lies in in being right next to a colon. I'll see if I can make the parsing code more lenient.

@osiewicz osiewicz changed the title file paths are not clickable on tasks Terminal file paths cannot be clicked when column portion of path is malformed Apr 17, 2024
osiewicz added a commit that referenced this issue Apr 17, 2024
This relaxes path parsing to allow paths like ./foo.rs:food or ./food/foo_bar.rs:2:12:food as some tools may
add a suffix without regard for col/row end.

Fixes #10688
@pedrorolo
Copy link
Author

pedrorolo commented Apr 17, 2024

I believe that this might also be broken when there's also row information

# ./filename.rb:37:50: in `method_name'

@osiewicz
Copy link
Contributor

It should work just fine with the PR I've opened today

@Moshyfawn Moshyfawn added mouse interaction Feedback for mouse interaction states, actions, etc terminal Feedback for terminal integration, shell commands, etc and removed triage Maintainer needs to classify the issue labels Apr 17, 2024
osiewicz added a commit that referenced this issue Apr 17, 2024
…10691)

This relaxes path parsing to allow paths like ./foo.rs:food or
./food/foo_bar.rs:2:12:food as some tools may add a suffix without
regard for col/row end.

Fixes #10688 

Release Notes:

- Made path parsing in terminal (for directory links) more lenient with
regards to row/column fields.
@JosephTLyons JosephTLyons removed the admin read Pending admin review label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] mouse interaction Feedback for mouse interaction states, actions, etc terminal Feedback for terminal integration, shell commands, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants