Skip to content

Commit 1975aa9

Browse files
committed
fix: Update initial window size on SSH TTY (#1174)
It required a window resize before to trigger a size update. This fixes it!
1 parent 8425ab6 commit 1975aa9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

agent/agent.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
331331
if err != nil {
332332
return xerrors.Errorf("start command: %w", err)
333333
}
334+
err = ptty.Resize(uint16(sshPty.Window.Height), uint16(sshPty.Window.Width))
335+
if err != nil {
336+
return xerrors.Errorf("resize ptty: %w", err)
337+
}
334338
go func() {
335339
for win := range windowSize {
336340
err = ptty.Resize(uint16(win.Height), uint16(win.Width))

0 commit comments

Comments
 (0)