Don't initialize an invalid pty size
This commit is contained in:
parent
b0f25c3e01
commit
5b2336d0d7
1 changed files with 3 additions and 0 deletions
|
@ -230,6 +230,9 @@ func (term *Terminal) Draw(ctx *ui.Context) {
|
||||||
Cols: uint16(ctx.Width()),
|
Cols: uint16(ctx.Width()),
|
||||||
Rows: uint16(ctx.Height()),
|
Rows: uint16(ctx.Height()),
|
||||||
}
|
}
|
||||||
|
if winsize.Cols == 0 || winsize.Rows == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if term.pty == nil {
|
if term.pty == nil {
|
||||||
term.vterm.SetSize(ctx.Height(), ctx.Width())
|
term.vterm.SetSize(ctx.Height(), ctx.Width())
|
||||||
|
|
Loading…
Reference in a new issue