// Resize resizes the terminal. func (t *attachSSH) Resize(cols, rows, widthpx, heightpx uint32) error { defer trace.End(trace.Begin("")) msg := msgs.WindowChangeMsg{ Columns: cols, Rows: rows, WidthPx: widthpx, HeightPx: heightpx, } ok, err := t.channel.SendRequest(msgs.WindowChangeReq, true, msg.Marshal()) if err == nil && !ok { return fmt.Errorf("unknown error") } if err != nil { return fmt.Errorf("resize error: %s", err) } return nil }