Call IRenderer.onCharSizeChanged at right time

Even though Renderer just defers this to onResize, future IRenderer
implementations may take advantage of onCharSizeChanged specifically.
This commit is contained in:
Daniel Imms
2018-05-02 15:00:42 -07:00
parent e48b15e859
commit 20ff107768
+1 -1
View File
@@ -716,7 +716,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
// dprchange should handle this case, we need this as well for browsers that don't support the
// matchMedia query.
this._disposables.push(Dom.addDisposableListener(window, 'resize', () => this.renderer.onWindowResize(window.devicePixelRatio)));
this.charMeasure.on('charsizechanged', () => this.renderer.onResize(this.cols, this.rows));
this.charMeasure.on('charsizechanged', () => this.renderer.onCharSizeChanged());
this.renderer.on('resize', (dimensions) => this.viewport.syncScrollArea());
this.selectionManager = new SelectionManager(this, this.charMeasure);