Merge pull request #2869 from Tyriar/vs95556

Invalidate all links above when the terminal scrolls
This commit is contained in:
Daniel Imms
2020-04-25 07:17:20 -07:00
committed by GitHub
+4 -1
View File
@@ -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);
}));
}
}