Add an option to disable client window resizes

This goes great with tmux when you are sharing your terminal for
presentations and you don't want to give viewers the ability to resize
your terminal
This commit is contained in:
Robert Bittle 2016-09-07 15:18:33 -04:00
parent ddbaa983c0
commit 8fd09cd9ec
No known key found for this signature in database
GPG key ID: 3F40BD9637DB2636
3 changed files with 18 additions and 2 deletions

View file

@ -197,14 +197,24 @@ func (context *clientContext) processReceive() {
return
}
rows := uint16(context.app.options.Height)
if rows == 0 {
rows = uint16(args.Rows)
}
columns := uint16(context.app.options.Width)
if columns == 0 {
columns = uint16(args.Columns)
}
window := struct {
row uint16
col uint16
x uint16
y uint16
}{
uint16(args.Rows),
uint16(args.Columns),
rows,
columns,
0,
0,
}