File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ export class Viewport extends Disposable implements IViewport {
3030 private _wheelPartialScroll : number = 0 ;
3131
3232 private _refreshAnimationFrame : number | null = null ;
33- private _ignoreNextScrollEvent : boolean = false ;
3433
3534 constructor (
3635 private readonly _scrollLines : ( amount : number ) => void ,
@@ -88,14 +87,12 @@ export class Viewport extends Disposable implements IViewport {
8887 // Sync scrollTop
8988 const scrollTop = this . _bufferService . buffer . ydisp * this . _currentRowHeight ;
9089 if ( this . _viewportElement . scrollTop !== scrollTop ) {
91- // Ignore the next scroll event which will be triggered by setting the scrollTop as we do not
92- // want this event to scroll the terminal
93- this . _ignoreNextScrollEvent = true ;
9490 this . _viewportElement . scrollTop = scrollTop ;
9591 }
9692
9793 this . _refreshAnimationFrame = null ;
9894 }
95+
9996 /**
10097 * Updates dimensions and synchronizes the scroll area if necessary.
10198 */
@@ -148,12 +145,6 @@ export class Viewport extends Disposable implements IViewport {
148145 return ;
149146 }
150147
151- // Ignore the event if it was flagged to ignore (when the source of the event is from Viewport)
152- if ( this . _ignoreNextScrollEvent ) {
153- this . _ignoreNextScrollEvent = false ;
154- return ;
155- }
156-
157148 const newRow = Math . round ( this . _lastScrollTop / this . _currentRowHeight ) ;
158149 const diff = newRow - this . _bufferService . buffer . ydisp ;
159150 this . _scrollLines ( diff ) ;
You can’t perform that action at this time.
0 commit comments