aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-07-13 11:13:48 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-13 11:13:48 -0400
commit5b2336d0d77615cc2326983b6c5109b6e760ad31 (patch)
tree724f17266de276ebe8d8d68522c49b4442d6bf6b /widgets
parentb0f25c3e0125bac08b49ad2a95a2cd05c2ba023b (diff)
Don't initialize an invalid pty size
Diffstat (limited to 'widgets')
-rw-r--r--widgets/terminal.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go
index 437c995..aa7c2ba 100644
--- a/widgets/terminal.go
+++ b/widgets/terminal.go
@@ -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())