aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/terminal.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/terminal.go')
-rw-r--r--widgets/terminal.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go
index 68c95534..b6e8fc0e 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)