From 973eb7b350315f4cd004644b496305a685986711 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 11 May 2021 05:10:04 -0700 Subject: [PATCH] Make sure all rows are refreshed on input Fixes #3323 --- src/browser/Viewport.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/browser/Viewport.ts b/src/browser/Viewport.ts index 02f74ce8..7b377a47 100644 --- a/src/browser/Viewport.ts +++ b/src/browser/Viewport.ts @@ -30,7 +30,6 @@ export class Viewport extends Disposable implements IViewport { private _wheelPartialScroll: number = 0; private _refreshAnimationFrame: number | null = null; - private _ignoreNextScrollEvent: boolean = false; constructor( private readonly _scrollLines: (amount: number) => void, @@ -88,14 +87,12 @@ export class Viewport extends Disposable implements IViewport { // Sync scrollTop const scrollTop = this._bufferService.buffer.ydisp * this._currentRowHeight; if (this._viewportElement.scrollTop !== scrollTop) { - // Ignore the next scroll event which will be triggered by setting the scrollTop as we do not - // want this event to scroll the terminal - this._ignoreNextScrollEvent = true; this._viewportElement.scrollTop = scrollTop; } this._refreshAnimationFrame = null; } + /** * Updates dimensions and synchronizes the scroll area if necessary. */ @@ -148,12 +145,6 @@ export class Viewport extends Disposable implements IViewport { return; } - // Ignore the event if it was flagged to ignore (when the source of the event is from Viewport) - if (this._ignoreNextScrollEvent) { - this._ignoreNextScrollEvent = false; - return; - } - const newRow = Math.round(this._lastScrollTop / this._currentRowHeight); const diff = newRow - this._bufferService.buffer.ydisp; this._scrollLines(diff);