We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e4e126 commit 06d025bCopy full SHA for 06d025b
1 file changed
lib/input-handler.ts
@@ -506,10 +506,16 @@ export class InputHandler {
506
return;
507
}
508
509
- // Send the text to the terminal
510
- // Note: For bracketed paste mode, we would wrap this in \x1b[200~ ... \x1b[201~
511
- // but for now, send raw text
512
- this.onDataCallback(text);
+ // Check if bracketed paste mode is enabled (DEC mode 2004)
+ const hasBracketedPaste = this.getModeCallback?.(2004) ?? false;
+
+ if (hasBracketedPaste) {
513
+ // Wrap with bracketed paste sequences
514
+ this.onDataCallback('\x1b[200~' + text + '\x1b[201~');
515
+ } else {
516
+ // Send raw text
517
+ this.onDataCallback(text);
518
+ }
519
520
521
/**
0 commit comments