Skip to content

Commit

Permalink
Merge pull request #4776 from Tyriar/4775
Browse files Browse the repository at this point in the history
Fix viewport error during term dispose
  • Loading branch information
Tyriar committed Sep 9, 2023
2 parents b7f28c5 + 681ba48 commit 36bf3eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/browser/Viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ export class Viewport extends Disposable implements IViewport {

private _innerRefresh(): void {
if (this._charSizeService.height > 0) {
this._currentRowHeight = this._renderService.dimensions.device.cell.height / this._coreBrowserService.dpr;
this._currentDeviceCellHeight = this._renderService.dimensions.device.cell.height;
this._currentRowHeight = this._renderDimensions.device.cell.height / this._coreBrowserService.dpr;
this._currentDeviceCellHeight = this._renderDimensions.device.cell.height;
this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
const newBufferHeight = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderService.dimensions.css.canvas.height);
const newBufferHeight = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderDimensions.css.canvas.height);
if (this._lastRecordedBufferHeight !== newBufferHeight) {
this._lastRecordedBufferHeight = newBufferHeight;
this._scrollArea.style.height = this._lastRecordedBufferHeight + 'px';
Expand Down

0 comments on commit 36bf3eb

Please sign in to comment.