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

Allow link provider results to get merged if the link range is identical #2915

Open
Tyriar opened this issue May 6, 2020 · 1 comment
Open
Assignees
Labels
area/links type/enhancement Features or improvements to existing features

Comments

@Tyriar
Copy link
Member

Tyriar commented May 6, 2020

In order to facilitate something like being able to use multiple link providers via a tooltip rather than just the default, we should expose links that match the range of another link exactly through the API.

VS Code issue: microsoft/vscode#97070

@Tyriar Tyriar added type/enhancement Features or improvements to existing features area/links labels May 6, 2020
@Tyriar Tyriar added this to the 4.6.0 milestone May 6, 2020
@Tyriar Tyriar self-assigned this May 6, 2020
@Tyriar Tyriar removed this from the 4.6.0 milestone May 6, 2020
@Tyriar
Copy link
Member Author

Tyriar commented May 6, 2020

Possible proposal:

interface ILink {
  // Filled in by xterm.js
  mergedLinks?: ILink[];
}

This is a little weird as it's a property not intended to be provided by the embedder. Another alternative:

interface ILinkProvider {
  provideLinks(bufferLineNumber: number, callback: (links: ILink[] | undefined) => IResolvedLink[] | undefined): void;
}
interface IResolvedLink extends ILink {
  mergedLinks?: ILink[];
}

This would allow the embedder to grab the resolved links from the callback function that would fill things in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/links type/enhancement Features or improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant