Allow embedders to customize link decorations independently

See microsoft/vscode#95631
This commit is contained in:
Daniel Imms
2020-04-19 04:07:22 -07:00
parent 67fde3e941
commit 2ce435f98d
3 changed files with 63 additions and 24 deletions
+19 -3
View File
@@ -1121,10 +1121,11 @@ declare module 'xterm' {
text: string;
/**
* Whether to hide the underline and cursor styles, this property is tracked and changes made
* after the link is provided will trigger changes.
* What link decorations to show when hovering the link, this property is tracked and changes
* made after the link is provided will trigger changes. If not set, all decroations will be
* enabled.
*/
hideDecorations?: boolean;
decorations?: ILinkDecorations;
/**
* Calls when the link is activated.
@@ -1150,6 +1151,21 @@ declare module 'xterm' {
leave?(event: MouseEvent, text: string): void;
}
/**
* A set of decorations that can be applied to links.
*/
interface ILinkDecorations {
/**
* Whether the cursor is set to pointer.
*/
pointerCursor: boolean;
/**
* Whether the underline is visible
*/
underline: boolean;
}
/**
* A range within a buffer.
*/