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

Detect terminal links with space, then line:col #153957

Merged
merged 2 commits into from Jul 6, 2022

Conversation

ssigwart
Copy link
Contributor

@ssigwart ssigwart commented Jul 2, 2022

This PR fixes #140780

To test, you can open a terminal and run echo ./myFile.txt 10:5 (replacing the filename with one that exists). When you click to open the file, it should open to line 10, column 5.

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I added a test to make sure we don't break it 🙂

@meganrogge meganrogge merged commit 9c5408c into microsoft:main Jul 6, 2022
@ssigwart
Copy link
Contributor Author

ssigwart commented Jul 6, 2022

Thanks for adding the test, @Tyriar.

@ssigwart ssigwart deleted the termLinks branch July 7, 2022 00:43
@galenbwill
Copy link

This commit seems to break links of the form:
(file path):45
and
(file path):45:13
It prevents them from navigating to the line (and column).

@Tyriar
Copy link
Member

Tyriar commented Jul 14, 2022

@galenbwill you might be seeing #155065 which isn't out in insiders yet?

@tjx666
Copy link
Contributor

tjx666 commented Jul 15, 2022

For path like './web/pages/home/componentPanel.tsx:55:9'
can't go to the right line and column, but can go to file.

@Tyriar still an issue in latest insider.

Version: 1.70.0-insider (Universal)
Commit: 1cd90cceddf3c413673963ab6f154d2ff294b17c
Date: 2022-07-15T05:17:24.241Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin x64 21.5.0

@Tyriar
Copy link
Member

Tyriar commented Jul 18, 2022

@tjx666 both ./web/pages/home/componentPanel.tsx:55:9 and web/pages/home/componentPanel.tsx:55:9 formats are working for me on macOS, both with and without shell integration enabled. If you can still repro could you open a new issue with a more detailed report?

@galenbwill
Copy link

galenbwill commented Jul 18, 2022

I can confirm that (file path):55:9 and (file path):55 are now working for me on latest insiders 1.70.0 on macOS:

Version: 1.70.0-insider
Commit: 1cd90cceddf3c413673963ab6f154d2ff294b17c
Date: 2022-07-15T05:32:19.076Z (3 days ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin arm64 21.5.0

@tjx666
Copy link
Contributor

tjx666 commented Jul 18, 2022

@Tyriar #155532

@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jump to line+column in terminal links (format <path> l:c)
6 participants