mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix canvas resizing with non-1 lineHeight
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user