Don't initialize an invalid pty size

This commit is contained in:
Drew DeVault 2019-07-13 11:13:48 -04:00
parent b0f25c3e01
commit 5b2336d0d7

View file

@ -230,6 +230,9 @@ func (term *Terminal) Draw(ctx *ui.Context) {
Cols: uint16(ctx.Width()),
Rows: uint16(ctx.Height()),
}
if winsize.Cols == 0 || winsize.Rows == 0 {
return
}
if term.pty == nil {
term.vterm.SetSize(ctx.Height(), ctx.Width())