Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions lib/input-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,16 @@ export class InputHandler {
return;
}

// Send the text to the terminal
// Note: For bracketed paste mode, we would wrap this in \x1b[200~ ... \x1b[201~
// but for now, send raw text
this.onDataCallback(text);
// Check if bracketed paste mode is enabled (DEC mode 2004)
const hasBracketedPaste = this.getModeCallback?.(2004) ?? false;

if (hasBracketedPaste) {
// Wrap with bracketed paste sequences
this.onDataCallback('\x1b[200~' + text + '\x1b[201~');
} else {
// Send raw text
this.onDataCallback(text);
}
}

/**
Expand Down