-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Link detection fails around punctuation characters in Output windows #191398
Comments
Also noticed absolute file paths that have a trailing comma because it is middle of a sentence also doesn't work. Even if this like this are legal paths or URLs, it would be more likely wrong contextually if it was sentence punctuation. A bare question mark also probably wouldn't hurt being dropped from contextual links since that would be an empty query anyways. |
This should already be working: The panic links you showed at the bottom also should work: It's not clear if the first one is relative to the workspace or some rust internals, if it's the latter a link provider could be implemented in the rust extension to handle this. Any more details on reproducing this? Could you see if this happens in Insiders also? https://code.visualstudio.com/insiders If it still does not work on Insiders you can enable the trace log level via the command palette, hover the lines in question and then copy the Output > Terminal output channel. |
I'll try and get back soon with more info on how to reproduce. However your tests above are with a user shell Terminal. My examples were from things like the |
@kriswuollett oh do you mean they're in the output panel, not the terminal panel? The output panel is totally separate and lacks a lot of the features of the terminal. |
Yes, let me update the title since I made an assumption that the Terminal would behave the same where I saw the issue in the Output windows. Would it be rather straightforward for the Output windows to be brought to parity with the Terminal windows w.r.t. link detection? Would it be something like the following such that the responsibility can be taken over by the extension owner of the output window(s): vscode/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.ts Lines 22 to 35 in 42ce7b7
|
@kriswuollett it would be quite tough unfortunately as they're completely separate codebases (output based on monaco, terminal based on xterm.js). Here's the out of scope request that tracked what you're asking for #107314, and some more link requests #163778, #149153. If you need good link detection you need to use a terminal, something an extension can do which might be relevant is to create a background terminal and then show it on command: vscode/src/vscode-dts/vscode.d.ts Lines 11012 to 11019 in cd7388f
Or just buffer the data and delay creating the terminal all together until asked. Closing this out as it's up to an extension to route the content to the terminal for good link support. |
I'd think that any quote-like character that appears before a detected URL in places like the Terminal or Output windows should be trimmed from the end of the URL as a heuristic. Because for example, currently the trailing backtick is included in the file URL, so an error of "Cargo.toml`" is not will appear in a dialog upon click following:
See rust-lang/rust-analyzer#15518
The text was updated successfully, but these errors were encountered: