What
Adds bracketed-paste support to the interactive line editor.
Pasting multi-line text without bracketed paste is a classic footgun: each embedded newline submits a line, so a pasted block runs partially, line by line — often executing something the user hadn't reviewed. Den had no paste handling at all.
- Enable the mode (
ESC[?2004hon entry /ESC[?2004lon exit) so the terminal wraps pastes inESC[200~ … ESC[201~. types.zig: addpaste_start/paste_endtoEscapeSequence.escape.zig: map CSI200~/201~(the existingESC[N~number parser already does the work — two switch arms).line_editor.zig:handlePastereads everything up to the terminator via a small state machine and inserts it in one batch (insertPasteByte, single redraw), normalizing embedded newlines/tabs to spaces so the whole paste stays on one editable line and only runs on Enter.
Verification
zig buildclean (the exhaustiveEscapeSequenceswitches forced both handlers to cover the new variants).- PTY test: pasting
echo LINE1\necho DANGER2bracketed byESC[200~/201~yields the single lineecho LINE1 echo DANGER2; standaloneecho LINE1is never executed;ESC[?2004h/lare emitted.
Three small, additive files; no API changes.