fix(app): terminal flakiness
This commit is contained in:
parent
001b486356
commit
cdbb009ab0
3 changed files with 72 additions and 28 deletions
|
|
@ -146,11 +146,12 @@ export const Terminal = (props: TerminalProps) => {
|
|||
term.resize(local.pty.cols, local.pty.rows)
|
||||
}
|
||||
term.reset()
|
||||
term.write(local.pty.buffer)
|
||||
if (local.pty.scrollY) {
|
||||
term.scrollToLine(local.pty.scrollY)
|
||||
}
|
||||
fitAddon.fit()
|
||||
term.write(local.pty.buffer, () => {
|
||||
if (local.pty.scrollY) {
|
||||
term.scrollToLine(local.pty.scrollY)
|
||||
}
|
||||
fitAddon.fit()
|
||||
})
|
||||
}
|
||||
|
||||
fitAddon.observeResize()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue