diff options
-rw-r--r-- | widgets/terminal.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go index 68c9553..b6e8fc0 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -254,10 +254,13 @@ func (term *Terminal) Draw(ctx *ui.Context) { } } - rows, cols, err := pty.Getsize(term.pty) + ws, err := pty.GetsizeFull(term.pty) if err != nil { return } + rows := int(ws.Rows) + cols := int(ws.Cols) + if ctx.Width() != cols || ctx.Height() != rows { term.writeMutex.Lock() pty.Setsize(term.pty, &winsize) |