mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-02-22 02:41:23 +01:00
pass flexrows through to packet.TermOpts so it gets back to the FE correctly. this fixes wterm overrides and github issue #116 (#134)
This commit is contained in:
parent
e79dcaf910
commit
4adcf6d92e
@ -676,6 +676,7 @@ type TermOpts struct {
|
|||||||
Cols int `json:"cols"`
|
Cols int `json:"cols"`
|
||||||
Term string `json:"term"`
|
Term string `json:"term"`
|
||||||
MaxPtySize int64 `json:"maxptysize,omitempty"`
|
MaxPtySize int64 `json:"maxptysize,omitempty"`
|
||||||
|
FlexRows bool `json:"flexrows,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RemoteFd struct {
|
type RemoteFd struct {
|
||||||
|
@ -110,6 +110,7 @@ func GetUITermOpts(winSize *packet.WinSize, ptermStr string) (*packet.TermOpts,
|
|||||||
termOpts.MaxPtySize = base.BoundInt64(termOpts.MaxPtySize, shexec.MinMaxPtySize, shexec.MaxMaxPtySize)
|
termOpts.MaxPtySize = base.BoundInt64(termOpts.MaxPtySize, shexec.MinMaxPtySize, shexec.MaxMaxPtySize)
|
||||||
termOpts.Cols = base.BoundInt(termOpts.Cols, shexec.MinTermCols, shexec.MaxTermCols)
|
termOpts.Cols = base.BoundInt(termOpts.Cols, shexec.MinTermCols, shexec.MaxTermCols)
|
||||||
termOpts.Rows = base.BoundInt(termOpts.Rows, shexec.MinTermRows, shexec.MaxTermRows)
|
termOpts.Rows = base.BoundInt(termOpts.Rows, shexec.MinTermRows, shexec.MaxTermRows)
|
||||||
|
termOpts.FlexRows = opts.RowsFlex
|
||||||
return termOpts, nil
|
return termOpts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +118,7 @@ func convertTermOpts(pkto *packet.TermOpts) *sstore.TermOpts {
|
|||||||
return &sstore.TermOpts{
|
return &sstore.TermOpts{
|
||||||
Rows: int64(pkto.Rows),
|
Rows: int64(pkto.Rows),
|
||||||
Cols: int64(pkto.Cols),
|
Cols: int64(pkto.Cols),
|
||||||
FlexRows: true,
|
FlexRows: pkto.FlexRows,
|
||||||
MaxPtySize: pkto.MaxPtySize,
|
MaxPtySize: pkto.MaxPtySize,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1414,7 +1414,7 @@ func (msh *MShellProc) SendFileData(dataPk *packet.FileDataPacketType) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func makeTermOpts(runPk *packet.RunPacketType) sstore.TermOpts {
|
func makeTermOpts(runPk *packet.RunPacketType) sstore.TermOpts {
|
||||||
return sstore.TermOpts{Rows: int64(runPk.TermOpts.Rows), Cols: int64(runPk.TermOpts.Cols), FlexRows: true, MaxPtySize: DefaultMaxPtySize}
|
return sstore.TermOpts{Rows: int64(runPk.TermOpts.Rows), Cols: int64(runPk.TermOpts.Cols), FlexRows: runPk.TermOpts.FlexRows, MaxPtySize: DefaultMaxPtySize}
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns (ok, currentPSC)
|
// returns (ok, currentPSC)
|
||||||
|
Loading…
Reference in New Issue
Block a user