mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
parent
93327316c0
commit
76384da25e
|
@ -86,7 +86,7 @@
|
|||
"vscode-proxy-agent": "^0.12.0",
|
||||
"vscode-regexpp": "^3.1.0",
|
||||
"vscode-textmate": "7.0.1",
|
||||
"xterm": "5.0.0-beta.44",
|
||||
"xterm": "5.0.0-beta.47",
|
||||
"xterm-addon-canvas": "0.2.0-beta.21",
|
||||
"xterm-addon-search": "0.10.0-beta.5",
|
||||
"xterm-addon-serialize": "0.8.0-beta.5",
|
||||
|
@ -123,8 +123,8 @@
|
|||
"@types/winreg": "^1.2.30",
|
||||
"@types/yauzl": "^2.9.1",
|
||||
"@types/yazl": "^2.4.2",
|
||||
"@typescript-eslint/experimental-utils": "^5.10.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
||||
"@typescript-eslint/experimental-utils": "^5.10.0",
|
||||
"@typescript-eslint/parser": "^5.10.0",
|
||||
"@vscode/telemetry-extractor": "^1.9.8",
|
||||
"@vscode/test-web": "^0.0.29",
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"vscode-proxy-agent": "^0.12.0",
|
||||
"vscode-regexpp": "^3.1.0",
|
||||
"vscode-textmate": "7.0.1",
|
||||
"xterm": "5.0.0-beta.44",
|
||||
"xterm": "5.0.0-beta.47",
|
||||
"xterm-addon-canvas": "0.2.0-beta.21",
|
||||
"xterm-addon-search": "0.10.0-beta.5",
|
||||
"xterm-addon-serialize": "0.8.0-beta.5",
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"tas-client-umd": "0.1.6",
|
||||
"vscode-oniguruma": "1.6.1",
|
||||
"vscode-textmate": "7.0.1",
|
||||
"xterm": "5.0.0-beta.44",
|
||||
"xterm": "5.0.0-beta.47",
|
||||
"xterm-addon-canvas": "0.2.0-beta.21",
|
||||
"xterm-addon-search": "0.10.0-beta.5",
|
||||
"xterm-addon-unicode11": "0.4.0-beta.5",
|
||||
|
|
|
@ -88,7 +88,7 @@ xterm-addon-webgl@0.13.0-beta.45:
|
|||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.45.tgz#f1f3c08e2a819970c1af0362eeb61185babcb6fc"
|
||||
integrity sha512-TXq5mxvG2alo5hSj/aFqHDzR2RSV2HH4is7R7kVmSCVPnl2RgDfAPilXOEJyYFLF09EgiGiG5UZASYJjvJfMRg==
|
||||
|
||||
xterm@5.0.0-beta.44:
|
||||
version "5.0.0-beta.44"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.44.tgz#854ed16c06808295777afc4ef7b78ccd55e59d4a"
|
||||
integrity sha512-raKvoikUjKZTO9duYliDp5hSKAwYia9P51QCumHY30V/bRZ2fq9ryyKQ65PxW8LzGYK8o7x7vNRUHVWbS073Tw==
|
||||
xterm@5.0.0-beta.47:
|
||||
version "5.0.0-beta.47"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.47.tgz#c2f865cb150dd649432d2f03749a2e03afa5b630"
|
||||
integrity sha512-XgaKHn+/OGzfK4d40f3ebs6q/5+v/i6Y1HI64/9IcxYuwtZQUqdhY6fgdwpJxphQKe1lB29JvZghDVKq15LxBA==
|
||||
|
|
|
@ -818,10 +818,10 @@ xterm-headless@5.0.0-beta.5:
|
|||
resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.0.0-beta.5.tgz#e29b6c5081f31f887122b7263ba996b0c46b3c22"
|
||||
integrity sha512-CMQ1+prBNF92oBMeZzc2rfTcmOaCGfwwSaoPYNTjyziZT6mZsEg7amajYkb0YAnqJ29MFm4kPGZbU78/dX4k2A==
|
||||
|
||||
xterm@5.0.0-beta.44:
|
||||
version "5.0.0-beta.44"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.44.tgz#854ed16c06808295777afc4ef7b78ccd55e59d4a"
|
||||
integrity sha512-raKvoikUjKZTO9duYliDp5hSKAwYia9P51QCumHY30V/bRZ2fq9ryyKQ65PxW8LzGYK8o7x7vNRUHVWbS073Tw==
|
||||
xterm@5.0.0-beta.47:
|
||||
version "5.0.0-beta.47"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.47.tgz#c2f865cb150dd649432d2f03749a2e03afa5b630"
|
||||
integrity sha512-XgaKHn+/OGzfK4d40f3ebs6q/5+v/i6Y1HI64/9IcxYuwtZQUqdhY6fgdwpJxphQKe1lB29JvZghDVKq15LxBA==
|
||||
|
||||
yallist@^4.0.0:
|
||||
version "4.0.0"
|
||||
|
|
|
@ -32,6 +32,7 @@ import { ITerminalCapabilityStore, TerminalCapability } from 'vs/platform/termin
|
|||
import { ITerminalConfiguration, ITerminalProcessManager, TERMINAL_CONFIG_SECTION } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { IHoverAction } from 'vs/workbench/services/hover/browser/hover';
|
||||
import type { ILink, ILinkProvider, IViewportRange, Terminal } from 'xterm';
|
||||
import { convertBufferRangeToViewport } from 'vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers';
|
||||
|
||||
export type XtermLinkMatcherHandler = (event: MouseEvent | undefined, link: string) => Promise<void>;
|
||||
export type XtermLinkMatcherValidationCallback = (uri: string, callback: (isValid: boolean) => void) => void;
|
||||
|
@ -92,6 +93,36 @@ export class TerminalLinkManager extends DisposableStore {
|
|||
this._openers.set(TerminalBuiltinLinkType.Url, this._instantiationService.createInstance(TerminalUrlLinkOpener, !!this._processManager.remoteAuthority));
|
||||
|
||||
this._registerStandardLinkProviders();
|
||||
|
||||
this._xterm.options.linkHandler = {
|
||||
activate: (e, text) => {
|
||||
this._openers.get(TerminalBuiltinLinkType.Url)?.open({
|
||||
type: TerminalBuiltinLinkType.Url,
|
||||
text,
|
||||
bufferRange: null!,
|
||||
uri: URI.parse(text)
|
||||
});
|
||||
},
|
||||
hover: (e, text, range) => {
|
||||
const core = (this._xterm as any)._core as IXtermCore;
|
||||
const cellDimensions = {
|
||||
width: core._renderService.dimensions.actualCellWidth,
|
||||
height: core._renderService.dimensions.actualCellHeight
|
||||
};
|
||||
const terminalDimensions = {
|
||||
width: this._xterm.cols,
|
||||
height: this._xterm.rows
|
||||
};
|
||||
this._showHover({
|
||||
viewportRange: convertBufferRangeToViewport(range, this._xterm.buffer.active.viewportY),
|
||||
cellDimensions,
|
||||
terminalDimensions
|
||||
}, this._getLinkHoverString(text, text), undefined, (text) => this._xterm.options.linkHandler!.activate(e, text, range));
|
||||
},
|
||||
leave: (e, text) => {
|
||||
console.log('leave');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private _setupLinkDetector(id: string, detector: ITerminalLinkDetector, isExternal: boolean = false): ILinkProvider {
|
||||
|
|
|
@ -55,7 +55,10 @@
|
|||
.xterm .xterm-helpers {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
/* The z-index of the helpers must be higher than the canvases in order for IMEs to appear on top. */
|
||||
/**
|
||||
* The z-index of the helpers must be higher than the canvases in order for
|
||||
* IMEs to appear on top.
|
||||
*/
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
|
|
|
@ -11542,10 +11542,10 @@ xterm-headless@5.0.0-beta.5:
|
|||
resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.0.0-beta.5.tgz#e29b6c5081f31f887122b7263ba996b0c46b3c22"
|
||||
integrity sha512-CMQ1+prBNF92oBMeZzc2rfTcmOaCGfwwSaoPYNTjyziZT6mZsEg7amajYkb0YAnqJ29MFm4kPGZbU78/dX4k2A==
|
||||
|
||||
xterm@5.0.0-beta.44:
|
||||
version "5.0.0-beta.44"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.44.tgz#854ed16c06808295777afc4ef7b78ccd55e59d4a"
|
||||
integrity sha512-raKvoikUjKZTO9duYliDp5hSKAwYia9P51QCumHY30V/bRZ2fq9ryyKQ65PxW8LzGYK8o7x7vNRUHVWbS073Tw==
|
||||
xterm@5.0.0-beta.47:
|
||||
version "5.0.0-beta.47"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.47.tgz#c2f865cb150dd649432d2f03749a2e03afa5b630"
|
||||
integrity sha512-XgaKHn+/OGzfK4d40f3ebs6q/5+v/i6Y1HI64/9IcxYuwtZQUqdhY6fgdwpJxphQKe1lB29JvZghDVKq15LxBA==
|
||||
|
||||
y18n@^3.2.1:
|
||||
version "3.2.2"
|
||||
|
|
Loading…
Reference in a new issue