Skip to content

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

Merged
Megan Rogge (meganrogge) merged 2 commits into
microsoft:mainfrom
ssigwart:termLinks
Jul 6, 2022
Merged

Detect terminal links with space, then line:col#153957
Megan Rogge (meganrogge) merged 2 commits into
microsoft:mainfrom
ssigwart:termLinks

Conversation

@ssigwart

Copy link
Copy Markdown
Contributor

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.

@Tyriar Daniel Imms (Tyriar) left a comment

Copy link
Copy Markdown
Contributor

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
Megan Rogge (meganrogge) merged commit 9c5408c into microsoft:main Jul 6, 2022
@ssigwart

Copy link
Copy Markdown
Contributor Author

Thanks for adding the test, Daniel Imms (@Tyriar).

@ssigwart
Stephen Sigwart (ssigwart) deleted the termLinks branch July 7, 2022 00:43
@galenbwill

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@tjx666

Copy link
Copy Markdown
Contributor

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

Daniel Imms (@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
Copy Markdown
Contributor

YuTengjing (@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

galenbwill commented Jul 18, 2022

Copy link
Copy Markdown

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
Copy Markdown
Contributor

Daniel Imms (@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