Change:
Issue Type: <bBug</b! by ctrl+leftclick to open a file in Terminal, a path like xx/xxx/xx/xx.c could be open and xx.c:13:3 could be open because recently opened, and auto jump to line/col but a path with line/col number like xx/xxx/xx/xx.c:13:3 can't be open VS Code version: Code 1.56.2 (, 2021-05-12T17:13:13.157Z) OS version: WindowsNT x64 10.0. Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2 <details<summarySystem Info</summary </details<details<summaryExtensions (7)</summaryExtensionVersion ------ remote-ssh0.65.4 remote-ssh-edit0.65.6 remote-wsl0.56.4 vim1.20.3 githistory0.6.16 cpptools1.4.0 hexeditor1.6.0 </details<!-- generated by issue reporter --
Links of that form work, your issue is because you have the folder opened and files are only resolved relative to the root folder. So it would work fine if you opened the parent folder of . I guess we could special case this to remove the first path segment if it matches the opened folder (ie. the initial cwd of the terminal).
Code pointer:
Thanks for your reply, Its very helpful for me to understand that, I add parent folder of codec to workspace, and it works as expect, much appreciated.
I suppose I can work on this. From what I understand, all I have to do is check if the prefix of the search query matches the root folder directory. If it does, we erase that first part and resume the code as usual, right?
pretty much yep, make sure it's a folder (link contains /, or  on windows) and a test would be good too which should be fairly easy to write in the existing test file.
I checked the code pointer that you sent above, but it doesn't seem like it points to the right place (this is my first time navigating the VS Code repository so there's a good chance that I'm wrong). I did some research and ended up in "", specifically . I one line (just to make sure I'm in the right place) that logs a message to the console whenever the user enters a new character in Quick Open, and it worked. Isn't that where I should be working? How is the terminal related to this issue?
we wouldn't want to change the quick access code but what the terminal sends to it:

Discussion:
import { TerminalBaseLinkProvider } from 'vs/workbench/contrib/terminal/browser/links/terminalBaseLinkProvider'; import { normalize } from 'vs/base/common/path'; import { convertLinkRangeToBuffer, getXtermLineContent } from 'vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers'; <ins> import { isWindows } from 'vs/base/common/platform'; </ins> const MAX_LENGTH = 2000;

// Normalize the link and remove any leading ./ or ../ since quick access doesn't understand // that format link = normalize(link).replace(/^(.+/)+/, ''); <ins> // If any of the names of the folders in the workspace matches // a prefix of the link, remove that prefix and continue this._workspaceContextService.getWorkspace().folders.forEach((folder) => { if (link.substr(0, folder.name.length + 1) === folder.name + (isWindows ? '' : '/')) { link = link.substring(folder.name.length + 1); return; } }); </ins> const results = await this._searchService.fileSearch( this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders, { filePattern: link,