Fix canvas resizing with non-1 lineHeight

This commit is contained in:
Daniel Imms
2017-09-03 07:41:18 -07:00
parent 5a4851630e
commit deb47e29bf
+2 -2
View File
@@ -48,13 +48,13 @@ export class Renderer {
public onResize(cols: number, rows: number): void {
const width = this._terminal.charMeasure.width * this._terminal.cols;
const height = Math.ceil(this._terminal.charMeasure.height * this._terminal.options.lineHeight) * this._terminal.rows;
const height = Math.floor(this._terminal.charMeasure.height * this._terminal.options.lineHeight) * this._terminal.rows;
this._renderLayers.forEach(l => l.resize(this._terminal, width, height, false));
}
public onCharSizeChanged(charWidth: number, charHeight: number): void {
const width = charWidth * this._terminal.cols;
const height = charHeight * this._terminal.rows;
const height = Math.floor(charHeight * this._terminal.options.lineHeight) * this._terminal.rows;
this._renderLayers.forEach(l => l.resize(this._terminal, width, height, true));
}