This repository has no description

Parser: stop OSC at the first BEL or ST master

parseOsc tried skipUntilST before checking for BEL, and skipUntilST grabs the first ESC byte from index 2 and assumes the next byte is \. If an OSC ends with BEL and another escape sequence follows it in the same buffer, that first ESC belongs to the next sequence, so the OSC reads past its own BEL and into it. Depending on the OSC type this dropped the next sequence or, for a color or paste reply, returned an error out of parse() that Loop.zig throws away with _ttyRun(...) catch {}, quietly killing the read thread. Scan for the first real terminator instead: BEL (0x07) or ST (ESC \). A bare ESC that is not part of an ST means the OSC was never terminated and a new sequence started, so return {null, 0} rather than reading past it. Adds tests for an OSC 11 color reply followed by DA1 and a BEL-terminated OSC followed by a CSI cursor-up.


+57 -10
1 changed file