Skip to content

Commit

Permalink
Show terminal link popup for custom link matchers
Browse files Browse the repository at this point in the history
Fixes #23149
  • Loading branch information
Tyriar committed Mar 24, 2017
1 parent 5134a2c commit ba87991
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
}
Expand Down

0 comments on commit ba87991

Please sign in to comment.