提交 fe39b1c6 编写于 作者: D Daniel Imms

Revert "Convert TerminalLink.length to endIndex"

This reverts commit 48ce8ecc.

Fixes #101455
上级 1660ed63
......@@ -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.
......
......@@ -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, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册