aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:28 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:49:25 +0100
commita977d1246d362baf9c8f45ef95df882091f681ac (patch)
treed1ce1557d54a5153de01167f1ee6224f381966a5 /app
parent6314e2dc67418141b12081bde846091e5e160702 (diff)
downloadaerc-a977d1246d362baf9c8f45ef95df882091f681ac.tar.gz
terminal: use start with appropriate size
Use the StartWithSize method to start the terminal with the appropriate size. This prevents multiple WINCH signals from being sent to the pty at startup Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r--app/terminal.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/terminal.go b/app/terminal.go
index 4814ff29..2527ef1a 100644
--- a/app/terminal.go
+++ b/app/terminal.go
@@ -84,7 +84,8 @@ func (term *Terminal) Draw(ctx *ui.Context) {
term.ctx = ctx
if !term.running && term.cmd != nil {
term.vterm.Attach(term.HandleEvent)
- if err := term.vterm.Start(term.cmd); err != nil {
+ w, h := ctx.Window().Size()
+ if err := term.vterm.StartWithSize(term.cmd, w, h); err != nil {
log.Errorf("error running terminal: %v", err)
term.closeErr(err)
return