mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-02-01 23:21:59 +01:00
parent
c47e17903d
commit
f0263865bd
@ -346,8 +346,11 @@ func (bc *BlockController) DoRunShellCommand(rc *RunShellOpts, blockMeta map[str
|
||||
if err != nil {
|
||||
log.Printf("error setting term size: %v\n", err)
|
||||
}
|
||||
err = bc.ShellProc.Cmd.SetSize(ic.TermSize.Rows, ic.TermSize.Cols)
|
||||
if err != nil {
|
||||
log.Printf("error setting remote SIGWINCH: %v\n", err)
|
||||
}
|
||||
}
|
||||
// TODO signals
|
||||
}
|
||||
}()
|
||||
go func() {
|
||||
|
@ -15,6 +15,7 @@ type ConnInterface interface {
|
||||
StdinPipe() (io.WriteCloser, error)
|
||||
StdoutPipe() (io.ReadCloser, error)
|
||||
StderrPipe() (io.ReadCloser, error)
|
||||
SetSize(w int, h int) error
|
||||
}
|
||||
|
||||
type CmdWrap struct {
|
||||
@ -52,6 +53,10 @@ func (cw CmdWrap) StderrPipe() (io.ReadCloser, error) {
|
||||
return cw.Cmd.StderrPipe()
|
||||
}
|
||||
|
||||
func (cw CmdWrap) SetSize(w int, h int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SessionWrap struct {
|
||||
Session *ssh.Session
|
||||
StartCmd string
|
||||
@ -90,3 +95,7 @@ func (sw SessionWrap) StderrPipe() (io.ReadCloser, error) {
|
||||
}
|
||||
return io.NopCloser(stderrReader), nil
|
||||
}
|
||||
|
||||
func (sw SessionWrap) SetSize(h int, w int) error {
|
||||
return sw.Session.WindowChange(h, w)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user