mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Cant flush response in a parser callback as it can cause recursive parsing
This commit is contained in:
@@ -1170,7 +1170,7 @@ accumulate_osc(Screen *screen, uint32_t ch, PyObject DUMP_UNUSED *dump_callback,
|
|||||||
default:
|
default:
|
||||||
if (screen->parser_buf_pos >= PARSER_BUF_SZ - 1) {
|
if (screen->parser_buf_pos >= PARSER_BUF_SZ - 1) {
|
||||||
if (handle_extended_osc_code(screen)) *extended_osc_code = true;
|
if (handle_extended_osc_code(screen)) *extended_osc_code = true;
|
||||||
else REPORT_ERROR("OSC sequence too long, truncating.");
|
else REPORT_ERROR("OSC sequence too long (> %d bytes) truncating.", PARSER_BUF_SZ);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
screen->parser_buf[screen->parser_buf_pos++] = ch;
|
screen->parser_buf[screen->parser_buf_pos++] = ch;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class PtyFileTransmission(FileTransmission):
|
|||||||
self.pty.callbacks.ftc = self
|
self.pty.callbacks.ftc = self
|
||||||
|
|
||||||
def write_ftc_to_child(self, payload: FileTransmissionCommand, appendleft: bool = False, use_pending: bool = True) -> bool:
|
def write_ftc_to_child(self, payload: FileTransmissionCommand, appendleft: bool = False, use_pending: bool = True) -> bool:
|
||||||
self.pty.write_to_child('\x1b]' + payload.serialize(prefix_with_osc_code=True) + '\x1b\\', flush=True)
|
self.pty.write_to_child('\x1b]' + payload.serialize(prefix_with_osc_code=True) + '\x1b\\', flush=False)
|
||||||
|
|
||||||
|
|
||||||
class TransferPTY(PTY):
|
class TransferPTY(PTY):
|
||||||
|
|||||||
Reference in New Issue
Block a user