From 3d9a33bb69d7d90ef7d157dde9b77369c6aacf70 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Sun, 25 Oct 2020 10:59:30 -0500 Subject: [PATCH] move measure before refreshRows --- src/browser/services/RenderService.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/browser/services/RenderService.ts b/src/browser/services/RenderService.ts index a362aa22..174a1272 100644 --- a/src/browser/services/RenderService.ts +++ b/src/browser/services/RenderService.ts @@ -87,15 +87,16 @@ export class RenderService extends Disposable implements IRenderService { private _onIntersectionChange(entry: IntersectionObserverEntry): void { this._isPaused = entry.isIntersecting === undefined ? (entry.intersectionRatio === 0) : !entry.isIntersecting; - if (!this._isPaused && this._needsFullRefresh) { - this.refreshRows(0, this._rowCount - 1); - this._needsFullRefresh = false; - } // Terminal was hidden on open if (!this._isPaused && !this._charSizeService.hasValidSize) { this._charSizeService.measure(); } + + if (!this._isPaused && this._needsFullRefresh) { + this.refreshRows(0, this._rowCount - 1); + this._needsFullRefresh = false; + } } public refreshRows(start: number, end: number, isRedrawOnly: boolean = false): void {