diff --git a/src/browser/Viewport.ts b/src/browser/Viewport.ts index f2cc6376..f73594bf 100644 --- a/src/browser/Viewport.ts +++ b/src/browser/Viewport.ts @@ -116,7 +116,7 @@ export class Viewport extends Disposable implements IViewport { this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH; } this._lastHadScrollBar = this.scrollBarWidth > 0; - + const elementStyle = window.getComputedStyle(this._element); const elementPadding = parseInt(elementStyle.paddingLeft) + parseInt(elementStyle.paddingRight); this._viewportElement.style.width = (this._renderService.dimensions.actualCellWidth * (this._bufferService.cols) + this.scrollBarWidth + (this._lastHadScrollBar ? elementPadding : 0)).toString() + 'px';