@xterm/xterm 5.6.0-beta.5 → 5.6.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/xterm.js +1 -1
- package/lib/xterm.js.map +1 -1
- package/package.json +1 -1
- package/src/browser/Viewport.ts +7 -1
package/package.json
CHANGED
package/src/browser/Viewport.ts
CHANGED
|
@@ -51,6 +51,8 @@ export class Viewport extends Disposable implements IViewport {
|
|
|
51
51
|
target: -1
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
private _ensureTimeout: number;
|
|
55
|
+
|
|
54
56
|
private readonly _onRequestScrollLines = this.register(new EventEmitter<{ amount: number, suppressScrollEvent: boolean }>());
|
|
55
57
|
public readonly onRequestScrollLines = this._onRequestScrollLines.event;
|
|
56
58
|
|
|
@@ -83,7 +85,7 @@ export class Viewport extends Disposable implements IViewport {
|
|
|
83
85
|
this.register(this._optionsService.onSpecificOptionChange('scrollback', () => this.syncScrollArea()));
|
|
84
86
|
|
|
85
87
|
// Perform this async to ensure the ICharSizeService is ready.
|
|
86
|
-
setTimeout(() => this.syncScrollArea());
|
|
88
|
+
this._ensureTimeout = window.setTimeout(() => this.syncScrollArea());
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
private _handleThemeChange(colors: ReadonlyColorSet): void {
|
|
@@ -405,4 +407,8 @@ export class Viewport extends Disposable implements IViewport {
|
|
|
405
407
|
this._viewportElement.scrollTop += deltaY;
|
|
406
408
|
return this._bubbleScroll(ev, deltaY);
|
|
407
409
|
}
|
|
410
|
+
|
|
411
|
+
public dispose(): void {
|
|
412
|
+
clearTimeout(this._ensureTimeout);
|
|
413
|
+
}
|
|
408
414
|
}
|