Skip to content

I'm working on a terminal tool and discovered this library. There is a problem:is there a way to resize a window in telnet? #1

@zundaren

Description

@zundaren

use xterm.js,
After adjusting the size with the NAWS method, the width is smaller than that of the actual terminal interface, Could it be made the same as ssh's WindowsChange

func (o *NAWS) writeSizeSubnegotiation(width, height int) {
	o.Terminal().Keyboard().WriteCommand(telnet.Command{
		OpCode: telnet.SB,
		Option: naws,
		Subnegotiation: []byte{
			byte((width >> 8) & 0xff),
			byte(width & 0xff),
			byte((height >> 8) & 0xff),
			byte(height & 0xff),
		},
	}, nil)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions