mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix: Update initial window size on SSH TTY (#1174)
It required a window resize before to trigger a size update. This fixes it!
This commit is contained in:
@ -331,6 +331,10 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("start command: %w", err)
|
return xerrors.Errorf("start command: %w", err)
|
||||||
}
|
}
|
||||||
|
err = ptty.Resize(uint16(sshPty.Window.Height), uint16(sshPty.Window.Width))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("resize ptty: %w", err)
|
||||||
|
}
|
||||||
go func() {
|
go func() {
|
||||||
for win := range windowSize {
|
for win := range windowSize {
|
||||||
err = ptty.Resize(uint16(win.Height), uint16(win.Width))
|
err = ptty.Resize(uint16(win.Height), uint16(win.Width))
|
||||||
|
Reference in New Issue
Block a user