vscode: can't go to line and column by click terminal link if project path contains space
My project is under /Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/vscode-fe-helper
:
Reproduce steps:
- using vscode open a folder which file path contains space, for example:
/Users/yutengjing/Library/Application Support/project-folder
- open an integrated terminal
- echo
file/under/project.ts:line:col
- click the path link
Versions:
Version: 1.70.0-insider (Universal)
Commit: 1ccfe2bbe804a20a7c657ca42368987fd1adac58
Date: 2022-07-18T08:46:51.862Z
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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (18 by maintainers)
Commits related to this issue
- Ensure folders with spaces don't impact link line/col Fixes #155532 — committed to microsoft/vscode by Tyriar 2 years ago
- Skip unit test that's breaking the build Part of #155532 — committed to microsoft/vscode by Tyriar 2 years ago
- Fix space folder link test Fixes #155532 See #155921 — committed to microsoft/vscode by Tyriar 2 years ago
- Simplify handling of local file links Part of #155532 — committed to microsoft/vscode by Tyriar 2 years ago
@meganrogge this is actually about when the parents of the link have a space, it’s expected currently that an absolute path with a space won’t work.
I looked into this, and it will be tricky because we currently use space as one of the characters which indicates the end of a path.
One idea would be to check if such a link exists (using our original regex) and if not, use regex on the subsequent sequence - then concatenating the two results
for
/path/to folder/file.txt
First result would be
/path to
❌ doesn’t existprocess
folder/file.txt
/path to
+folder/file.txt
👍 exists@tjx666 nice I can repro with the space in the name, thanks for following up 👍