Removed file detection from WebLinkProvider

This commit is contained in:
Jon Bockhorst
2019-11-01 01:05:18 -05:00
parent 0c5962c538
commit 3e2e4ace48
4 changed files with 18 additions and 32 deletions
+8 -2
View File
@@ -58,7 +58,10 @@ export class Linkifier2 implements ILinkifier2 {
// Show the tooltip
this._onShowTooltip.fire(this._createLinkHoverEvent(range.start.x - 1, range.start.y - 1, range.end.x - 1, range.end.y - 1, undefined));
this._element!.classList.add('xterm-cursor-pointer');
cachedLink.link.showTooltip(event, cachedLink.link.url);
if (cachedLink.link.showTooltip) {
cachedLink.link.showTooltip(event, cachedLink.link.url);
}
this._linkCache[i].mouseOver = true;
foundLink = true;
@@ -66,7 +69,10 @@ export class Linkifier2 implements ILinkifier2 {
// Hide the tooltip
this._onHideTooltip.fire(this._createLinkHoverEvent(range.start.x - 1, range.start.y - 1, range.end.x - 1, range.end.y - 1, undefined));
this._element!.classList.remove('xterm-cursor-pointer');
cachedLink.link.hideTooltip(event, cachedLink.link.url);
if (cachedLink.link.hideTooltip) {
cachedLink.link.hideTooltip(event, cachedLink.link.url);
}
this._linkCache[i].mouseOver = false;
}
+2 -2
View File
@@ -160,8 +160,8 @@ interface ILinkProvider {
interface ILink {
range: IBufferRange;
url: string;
showTooltip(event: MouseEvent, link: string): void;
hideTooltip(event: MouseEvent, link: string): void;
showTooltip?(event: MouseEvent, link: string): void;
hideTooltip?(event: MouseEvent, link: string): void;
handle(event: MouseEvent, link: string): void;
}