This commit is contained in:
Kovid Goyal 2022-02-24 00:00:45 +05:30
parent 198dd52700
commit d452a5cdce
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 9 additions and 7 deletions

View File

@ -1181,7 +1181,7 @@ START_ALLOW_CASE_RANGE
END_ALLOW_CASE_RANGE END_ALLOW_CASE_RANGE
if (screen->parser_buf_pos > 0 && screen->parser_buf[screen->parser_buf_pos-1] == ESC) { if (screen->parser_buf_pos > 0 && screen->parser_buf[screen->parser_buf_pos-1] == ESC) {
if (ch == '\\') { screen->parser_buf_pos--; return true; } if (ch == '\\') { screen->parser_buf_pos--; return true; }
REPORT_ERROR("DCS sequence contained ESC without trailing \\ ignoring the sequence"); REPORT_ERROR("DCS sequence contained ESC without trailing \\ at pos: %u ignoring the sequence", screen->parser_buf_pos);
SET_STATE(ESC); return false; SET_STATE(ESC); return false;
} }
if (screen->parser_buf_pos >= PARSER_BUF_SZ - 1) { if (screen->parser_buf_pos >= PARSER_BUF_SZ - 1) {

View File

@ -96,12 +96,14 @@ class Callbacks:
def handle_remote_ssh(self, msg): def handle_remote_ssh(self, msg):
from kittens.ssh.main import get_ssh_data from kittens.ssh.main import get_ssh_data
if self.pty:
for line in get_ssh_data(msg): for line in get_ssh_data(msg):
self.pty.write_to_child(line) self.pty.write_to_child(line)
self.pty.process_input_from_child(timeout=0) self.pty.process_input_from_child(timeout=0)
def handle_remote_echo(self, msg): def handle_remote_echo(self, msg):
from base64 import standard_b64decode from base64 import standard_b64decode
if self.pty:
data = standard_b64decode(msg) data = standard_b64decode(msg)
self.pty.write_to_child(data) self.pty.write_to_child(data)
self.pty.process_input_from_child(timeout=0) self.pty.process_input_from_child(timeout=0)