提交 134cbec2 编写于 作者: D Daniel Imms

Force a scroll bar refresh when the terminal is visible

Fixes #45134
上级 9389389e
......@@ -253,6 +253,14 @@ export class TerminalInstance implements ITerminalInstance {
// The panel is minimized
if (!this._isVisible) {
return TerminalInstance._lastKnownDimensions;
} else {
// Trigger scroll event manually so that the viewport's scroll area is synced. This
// needs to happen otherwise its scrollTop value is invalid when the panel is toggled as
// it gets removed and then added back to the DOM (resetting scrollTop to 0).
// Upstream issue: https://github.com/sourcelair/xterm.js/issues/291
if (this._xterm) {
this._xterm.emit('scroll', this._xterm.buffer.ydisp);
}
}
if (!this._wrapperElement) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册