url -> text
This commit is contained in:
+2
-2
@@ -685,8 +685,8 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
|
||||
} else {
|
||||
// according to MDN buttons only reports up to button 5 (AUX2)
|
||||
but = ev.buttons & 1 ? CoreMouseButton.LEFT :
|
||||
ev.buttons & 4 ? CoreMouseButton.MIDDLE :
|
||||
ev.buttons & 2 ? CoreMouseButton.RIGHT :
|
||||
ev.buttons & 4 ? CoreMouseButton.MIDDLE :
|
||||
ev.buttons & 2 ? CoreMouseButton.RIGHT :
|
||||
CoreMouseButton.NONE; // fallback to NONE
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -136,7 +136,7 @@ export class Linkifier2 implements ILinkifier2 {
|
||||
}
|
||||
|
||||
if (this._linkAtPosition(this._currentLink, position)) {
|
||||
this._currentLink.handle(event, this._currentLink.url);
|
||||
this._currentLink.handle(event, this._currentLink.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ export class Linkifier2 implements ILinkifier2 {
|
||||
element.classList.add('xterm-cursor-pointer');
|
||||
|
||||
if (link.showTooltip) {
|
||||
link.showTooltip(event, link.url);
|
||||
link.showTooltip(event, link.text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ export class Linkifier2 implements ILinkifier2 {
|
||||
element.classList.remove('xterm-cursor-pointer');
|
||||
|
||||
if (link.hideTooltip) {
|
||||
link.hideTooltip(event, link.url);
|
||||
link.hideTooltip(event, link.text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -171,10 +171,10 @@ interface ILinkProvider {
|
||||
|
||||
interface ILink {
|
||||
range: IBufferRange;
|
||||
url: string;
|
||||
showTooltip?(event: MouseEvent, link: string): void;
|
||||
hideTooltip?(event: MouseEvent, link: string): void;
|
||||
handle(event: MouseEvent, link: string): void;
|
||||
text: string;
|
||||
showTooltip?(event: MouseEvent, text: string): void;
|
||||
hideTooltip?(event: MouseEvent, text: string): void;
|
||||
handle(event: MouseEvent, text: string): void;
|
||||
}
|
||||
|
||||
interface IBufferRange {
|
||||
|
||||
Reference in New Issue
Block a user