提交 70426895 编写于 作者: D Daniel Imms

Fix NPE when terminal is not visible

Fixes #49828
上级 d53d1e9e
......@@ -537,7 +537,7 @@ export class TerminalInstance implements ITerminalInstance {
// background since scrollTop changes take no effect but the terminal's position does
// change since the number of visible rows decreases.
this._xterm.emit('scroll', this._xterm.buffer.ydisp);
if (this._container) {
if (this._container && this._container.parentElement) {
// Force a layout when the instance becomes invisible. This is particularly important
// 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册