diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index 83636c02af496..214f52151ba44 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -52,9 +52,17 @@ export class TerminalLinkHandler { } public registerCustomLinkHandler(regex: RegExp, handler: (uri: string) => void, matchIndex?: number, validationCallback?: XtermLinkMatcherValidationCallback): number { + const wrappedValidationCallback = (uri, element, callback) => { + this._addTooltipEventListeners(element); + if (validationCallback) { + validationCallback(uri, element, callback); + } else { + callback(true); + } + }; return this._xterm.registerLinkMatcher(regex, this._wrapLinkHandler(handler), { matchIndex, - validationCallback, + validationCallback: wrappedValidationCallback, priority: CUSTOM_LINK_PRIORITY }); }