Version: ghostty-web 0.4.0-next.20.g1858a59
What happens
term.write('') throws RangeError: offset is out of bounds (from Uint8Array.set) instead of
being a no-op. A WebSocket consumer that writes every message it receives hits this whenever a
message is empty after its own filtering. In our case, a control sequence is stripped out before
the write.
Repro
const term = new Terminal(); term.open(el);
term.write(''); // RangeError: offset is out of bounds
Expected
No-op, as in xterm.js.
Workaround
Callers skip empty writes (if (data) term.write(data)).
Version: ghostty-web 0.4.0-next.20.g1858a59
What happens
term.write('')throwsRangeError: offset is out of bounds(fromUint8Array.set) instead ofbeing a no-op. A WebSocket consumer that writes every message it receives hits this whenever a
message is empty after its own filtering. In our case, a control sequence is stripped out before
the write.
Repro
Expected
No-op, as in xterm.js.
Workaround
Callers skip empty writes (
if (data) term.write(data)).