Skip to content
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

When reusing a Terminal for a Task, TerminalLinkProvider.handleTerminalLink never gets called #134880

Closed
ewanharris opened this issue Oct 12, 2021 · 2 comments
Assignees

Comments

@ewanharris
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.61.0
  • OS Version: MacOS

When providing a TerminalLinkProvider, if the user if using a Task and reuses the terminal a Task has ran in he text gets detected and highlighted correctly, but TerminalLinkProvider.handleTerminalLink function is never called and it defaults to the file picker. Sample project and steps below. This happens even if "clear": true is set for presentation, but does not happen if the task is set to "panel": "new" for presentation.

Steps to Reproduce:

Sample project - https://github.com/ewanharris/terminallinkprovider-bug

  1. Cone the sample project repo
  2. Debug the extension
  3. Add the below task to the folder you are debugging in
{
	"version": "2.0.0",
	"tasks": [
		{
			"command": "node -e \"console.log('link')\"",
			"label": "Test",
			"type": "shell",
			"problemMatcher": [],
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"presentation": {
				// "panel": "new", // uncomment me and it works, but you get a new terminal everytime
				// "clear": true // uncomment me and it is still broken
			}
		}
	]
}
  1. Open command palette and Tasks: Run Build Task
  2. Click link in the terminal, a notification shows
  3. Open command palette and Tasks: Run Build Task (make sure to leave the terminal open)
  4. Click link in the terminal, no notification shows
    • link is identified and underlined correctly, but handleTerminalLink is just never called
@ewanharris
Copy link
Author

I gave it a stab debugging this in VS Code directly and it appears to maybe be something within xterm.js which I'm not sure how to drop down into

@ewanharris
Copy link
Author

Ha, sorry my bad, searched for dupe tickets yesterday and #134841 was filed between then and me filing this. I'll close this as a dupe

@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants