@xterm/xterm 5.6.0-beta.5 → 5.6.0-beta.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "5.6.0-beta.5",
4
+ "version": "5.6.0-beta.7",
5
5
  "main": "lib/xterm.js",
6
6
  "style": "css/xterm.css",
7
7
  "types": "typings/xterm.d.ts",
@@ -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
  }