diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 3962df3cdeae704f8afcb55aeec1e1e60d715155..fe2a8e2e565a3f97ab9ea24cd536bd0121078223 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1127,14 +1127,14 @@ declare module 'vscode' { export interface TerminalLink { /** - * The 0-based start index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]. + * The start index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]. */ startIndex: number; /** - * The 0-based end index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]. + * The length of the link on [TerminalLinkContext.line](#TerminalLinkContext.line] */ - endIndex: number; + length: 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 fa0153a25a69fcc57911be6523c03c87c1b2a91a..e01ab6a1513425ecff37f6fc26cca7cb582dbcb6 100644 --- a/src/vs/workbench/api/common/extHostTerminalService.ts +++ b/src/vs/workbench/api/common/extHostTerminalService.ts @@ -626,11 +626,10 @@ 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: endIndex - providerLink.startIndex, + length: providerLink.length, label: providerLink.tooltip }; cacheLinkMap.set(link.id, {