提交 94145d3d 编写于 作者: D Daniel Imms

Fix terminal layout in dev mode

上级 a32ca17c
......@@ -155,7 +155,7 @@ export class TerminalInstance implements ITerminalInstance {
return;
}
const computedStyle = window.getComputedStyle(this._container);
const computedStyle = window.getComputedStyle(this._container.parentElement);
const width = parseInt(computedStyle.getPropertyValue('width').replace('px', ''), 10);
const height = parseInt(computedStyle.getPropertyValue('height').replace('px', ''), 10);
this._evaluateColsAndRows(width, height);
......@@ -541,7 +541,7 @@ export class TerminalInstance implements ITerminalInstance {
// for ensuring that terminals that are created in the background by an extension will
// correctly get correct character measurements in order to render to the screen (see
// #34554).
const computedStyle = window.getComputedStyle(this._container);
const computedStyle = window.getComputedStyle(this._container.parentElement);
const width = parseInt(computedStyle.getPropertyValue('width').replace('px', ''), 10);
const height = parseInt(computedStyle.getPropertyValue('height').replace('px', ''), 10);
this.layout(new dom.Dimension(width, height));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册