fixed #7775 - line height changing unexpectedly when zooming in/out

This commit is contained in:
Eugene Pankov
2023-01-27 23:19:35 +01:00
parent 7491c3119f
commit f3d3e10afb

View File

@@ -482,7 +482,7 @@ export class XTermFrontend extends Frontend {
const scale = Math.pow(1.1, this.zoom)
this.xterm.options.fontSize = this.configuredFontSize * scale
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
this.xterm.options.lineHeight = Math.max(1, (this.configuredFontSize + this.configuredLinePadding * 2) / this.configuredFontSize * scale)
this.xterm.options.lineHeight = Math.max(1, (this.configuredFontSize + this.configuredLinePadding * 2) / this.configuredFontSize)
this.resizeHandler()
}