(e3)
| 306 | this._currentLink && this._lastMouseEvent && (!e3 || !t3 || this._currentLink.link.range.start.y >= e3 && this._currentLink.link.range.end.y <= t3) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, a.disposeArray)(this._linkCacheDisposables)); |
| 307 | } |
| 308 | _handleNewLink(e3) { |
| 309 | if (!this._lastMouseEvent) return; |
| 310 | const t3 = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService); |
| 311 | t3 && this._linkAtPosition(e3.link, t3) && (this._currentLink = e3, this._currentLink.state = { decorations: { underline: void 0 === e3.link.decorations || e3.link.decorations.underline, pointerCursor: void 0 === e3.link.decorations || e3.link.decorations.pointerCursor }, isHovered: true }, this._linkHover(this._element, e3.link, this._lastMouseEvent), e3.link.decorations = {}, Object.defineProperties(e3.link.decorations, { pointerCursor: { get: () => { |
| 312 | var _a, _b; |
| 313 | return (_b = (_a = this._currentLink) == null ? void 0 : _a.state) == null ? void 0 : _b.decorations.pointerCursor; |
| 314 | }, set: (e4) => { |
| 315 | var _a; |
| 316 | ((_a = this._currentLink) == null ? void 0 : _a.state) && this._currentLink.state.decorations.pointerCursor !== e4 && (this._currentLink.state.decorations.pointerCursor = e4, this._currentLink.state.isHovered && this._element.classList.toggle("xterm-cursor-pointer", e4)); |
| 317 | } }, underline: { get: () => { |
| 318 | var _a, _b; |
| 319 | return (_b = (_a = this._currentLink) == null ? void 0 : _a.state) == null ? void 0 : _b.decorations.underline; |
| 320 | }, set: (t4) => { |
| 321 | var _a, _b, _c; |
| 322 | ((_a = this._currentLink) == null ? void 0 : _a.state) && ((_c = (_b = this._currentLink) == null ? void 0 : _b.state) == null ? void 0 : _c.decorations.underline) !== t4 && (this._currentLink.state.decorations.underline = t4, this._currentLink.state.isHovered && this._fireUnderlineEvent(e3.link, t4)); |
| 323 | } } }), this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(((e4) => { |
| 324 | if (!this._currentLink) return; |
| 325 | const t4 = 0 === e4.start ? 0 : e4.start + 1 + this._bufferService.buffer.ydisp, i3 = this._bufferService.buffer.ydisp + 1 + e4.end; |
| 326 | if (this._currentLink.link.range.start.y >= t4 && this._currentLink.link.range.end.y <= i3 && (this._clearCurrentLink(t4, i3), this._lastMouseEvent)) { |
| 327 | const e5 = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService); |
| 328 | e5 && this._askForLink(e5, false); |
| 329 | } |
| 330 | })))); |
| 331 | } |
| 332 | _linkHover(e3, t3, i3) { |
| 333 | var _a; |
| 334 | ((_a = this._currentLink) == null ? void 0 : _a.state) && (this._currentLink.state.isHovered = true, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t3, true), this._currentLink.state.decorations.pointerCursor && e3.classList.add("xterm-cursor-pointer")), t3.hover && t3.hover(i3, t3.text); |
no test coverage detected