Skip to content

Commit 5d6ea3f

Browse files
meganroggeTyriar
andcommitted
Co-authored-by: Daniel Imms <[email protected]>
1 parent 7400007 commit 5d6ea3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,13 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
195195
}
196196
const fontSize = this._configurationService.inspect(TerminalSettingId.FontSize).value;
197197
const defaultFontSize = this._configurationService.inspect(TerminalSettingId.FontSize).defaultValue;
198-
if (typeof fontSize === 'number' && typeof defaultFontSize === 'number') {
198+
const lineHeight = this._configurationService.inspect(TerminalSettingId.LineHeight).value;
199+
if (typeof fontSize === 'number' && typeof defaultFontSize === 'number' && typeof lineHeight === 'number') {
199200
const scalar = (fontSize / defaultFontSize) <= 1 ? (fontSize / defaultFontSize) : 1;
200201

201202
// must be inlined to override the inlined styles from xterm
202203
element.style.width = `${scalar * DecorationStyles.DefaultDimension}px`;
203-
element.style.height = `${scalar * DecorationStyles.DefaultDimension}px`;
204+
element.style.height = `${scalar * DecorationStyles.DefaultDimension * lineHeight}px`;
204205
element.style.fontSize = `${scalar * DecorationStyles.DefaultDimension}px`;
205206

206207
// the first split terminal in the panel has more room

0 commit comments

Comments
 (0)