Fix xterm in shared terminals

This commit is contained in:
Gary Kim 2022-11-24 00:59:42 -05:00
parent ed3fb2013a
commit 4e24783662
No known key found for this signature in database
GPG Key ID: 9349B59FB54594AC
2 changed files with 16 additions and 4 deletions

View File

@ -1670,7 +1670,13 @@
return obj;
}
function tunnelUpdate(data) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } }
function tunnelUpdate(data) {
if (xterm.writeUtf8) {
if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); }
} else {
if (typeof data == 'string') { xterm.write(data); } else { xterm.write(new Uint8Array(data)); }
}
}
function sshTunnelUpdate(data) {
if (typeof data == 'string') {

View File

@ -1405,7 +1405,13 @@
return obj;
}
function tunnelUpdate(data) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } }
function tunnelUpdate(data) {
if (xterm.writeUtf8) {
if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); }
} else {
if (typeof data == 'string') { xterm.write(data); } else { xterm.write(new Uint8Array(data)); }
}
}
// Send the new terminal size to the agent
function xTermSendResize() {