Extension TerminalLinkProvider cannot detect links in reused task terminals #134841
Labels
bug
Issue identified by VS Code Team member as probable bug
insiders-released
Patch has been released in VS Code Insiders
tasks
Task system issues
terminal
General terminal issues that don't fall under another label
terminal-links
verified
Verification succeeded
Milestone
Does this issue occur when all extensions are disabled? Yes
Version: 1.61.0
Commit: ee8c7de
Date: 2021-10-07T18:11:58.853Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0
Steps to Reproduce:
terminalTest.registerTerminalLinkProvider
On the first run of the task the 'link' text will create a hover link correctly. If you re-run the task so the terminal has 2 (or more) runs of the task in the same terminal then the link will fail to detect correctly.
Adding a breakpoint to https://github.com/microsoft/vscode-extension-samples/blob/main/terminal-sample/src/extension.ts#L162 there appears to be 1 call per execution of the task in the terminal. I think when the terminal is re-used it re-registers the link provider and if two link providers have overlapping links they both seem to fail (which is a known issue #97070 but due to this bug all link providers start failing if tasks are run multiple times).
The text was updated successfully, but these errors were encountered: