We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello: I tried to dynamically set terminalWidth and terminalHeight with the following code:
sendNAWS(cols: number, rows: number): void { if (!this.socket || !this.socket.writable) { this.emit('error', new Error('Socket is not writable')); console.error('Socket is not writable. Cannot send NAWS.'); return; } const nawsBuffer = Buffer.from([ 255, // IAC 250, // SB 31, // NAWS (cols >> 8) & 0xff, // Columns high byte cols & 0xff, // Columns low byte (rows >> 8) & 0xff, // Rows high byte rows & 0xff, // Rows low byte 255, // IAC 240 // SE ]); console.log(`Sending NAWS command with cols=${cols}, rows=${rows}:`, nawsBuffer); this.socket.write(nawsBuffer, (err?: Error) => { if (err) { this.emit('error', err); console.error('Failed to send NAWS command:', err); } else { this.emit('geometrySet', { cols, rows }); console.log(`NAWS command sent successfully for cols=${cols}, rows=${rows}.`); } }); }
But it didn't work. Has anyone encountered the same requirement?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello:
I tried to dynamically set terminalWidth and terminalHeight with the following code:
But it didn't work. Has anyone encountered the same requirement?
The text was updated successfully, but these errors were encountered: