diff --git a/src/browser/Linkifier2.ts b/src/browser/Linkifier2.ts index a21f7621..bcdbffe6 100644 --- a/src/browser/Linkifier2.ts +++ b/src/browser/Linkifier2.ts @@ -237,7 +237,10 @@ export class Linkifier2 implements ILinkifier2 { // Add listener for rerendering if (this._renderService) { this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(e => { - this._clearCurrentLink(e.start + 1 + this._bufferService.buffer.ydisp, e.end + 1 + this._bufferService.buffer.ydisp); + // When start is 0 a scroll most likely occurred, make sure links above the fold also get + // cleared. + const start = e.start === 0 ? 0 : e.start + 1 + this._bufferService.buffer.ydisp; + this._clearCurrentLink(start, e.end + 1 + this._bufferService.buffer.ydisp); })); } }