From 9b1eec8adea79bf48717c0dc3478707187ab0018 Mon Sep 17 00:00:00 2001 From: metonym Date: Fri, 22 Oct 2021 09:49:01 -0700 Subject: [PATCH] fix(viewport): account for fallback scrollbar width --- src/browser/Viewport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/Viewport.ts b/src/browser/Viewport.ts index 3c9bea4c..afed55fa 100644 --- a/src/browser/Viewport.ts +++ b/src/browser/Viewport.ts @@ -116,7 +116,7 @@ export class Viewport extends Disposable implements IViewport { } this._lastHadScrollBar = this.scrollBarWidth > 0; - this._viewportElement.style.width = (this._renderService.dimensions.actualCellWidth * (this._bufferService.cols) + this.scrollBarWidth).toString() + 'px'; + this._viewportElement.style.width = (this._renderService.dimensions.actualCellWidth * (this._bufferService.cols) + this.scrollBarWidth + (this._lastHadScrollBar ? FALLBACK_SCROLL_BAR_WIDTH : 0)).toString() + 'px'; this._refreshAnimationFrame = null; }