-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Make sure markdown links execute an ext-host vscode.open
command always
#154993
Comments
I believe the root cause is that this ends invoking the renderer version of vscode/src/vs/workbench/browser/parts/editor/editorCommands.ts Lines 486 to 495 in 2c036d1
Instead of the one on the extension host that supports all the additional arguments |
I also tried using |
This needs special handling, like done for tree views etc, but that also means extensions cannot (and should not) be able to control the opening details but that the user-gesture (ctrl+click vs normal click) determines the "to the side" behaviour |
Took me a while to understand. First of all, vscode/src/vs/workbench/api/common/extHostApiCommands.ts Lines 381 to 392 in 4404dc6
This particular issue seems to be around command links in a document (which I am not aware of how they work). If I understand correctly, these links execute on the renderer and not on the extension host and as such, the additional arguments are not supported: vscode/src/vs/workbench/browser/parts/editor/editorCommands.ts Lines 484 to 495 in 4404dc6
Why can the renderer side not simply allow for the same options? |
Because those are API objects and no one transforms them into internal objects |
It seems to me that Matt wants to always open to the side, irrespective to the user-gesture? If so, I believe this is a feature request for document links to:
|
Let's maybe sync the three of us in August. |
vscode.open
on document link doesn't accept additional arguments
vscode.open
on document link doesn't accept additional argumentsvscode.open
command always
As discussed, the suggested fix is to call a |
Fixed by 077f586 |
I'm trying to use
vscode.open
withDocumentLinkProvider
. At present, only the first argument ofvscode.open
(the resource) seems to be respected. The other arguments are ignored.Here's an example extension that demonstrates this issue:
To repo:
abc.md
in the root of your workspace. Add a few lines of content to itExpected
This should open
abc.md
besides the current editorActual
abc.md
is opened in the same view columnThe text was updated successfully, but these errors were encountered: