diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 4d9694b8293e1..e0bf0a26ca6f4 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1089,14 +1089,14 @@ declare module 'vscode' { export interface TerminalLink { /** - * The start index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]. + * The 0-based start index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]. */ startIndex: number; /** - * The length of the link on [TerminalLinkContext.line](#TerminalLinkContext.line] + * The 0-based end index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]. */ - length: number; + endIndex: number; /** * The tooltip text when you hover over this link. diff --git a/src/vs/workbench/api/common/extHostTerminalService.ts b/src/vs/workbench/api/common/extHostTerminalService.ts index 4f73333c27a9c..fa5b30c76f99d 100644 --- a/src/vs/workbench/api/common/extHostTerminalService.ts +++ b/src/vs/workbench/api/common/extHostTerminalService.ts @@ -625,10 +625,11 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ for (const provideResult of provideResults) { if (provideResult && provideResult.links.length > 0) { result.push(...provideResult.links.map(providerLink => { + const endIndex = Math.max(providerLink.endIndex, providerLink.startIndex + 1); const link = { id: nextLinkId++, startIndex: providerLink.startIndex, - length: providerLink.length, + length: endIndex - providerLink.startIndex, label: providerLink.tooltip }; cacheLinkMap.set(link.id, {