File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/vs/workbench/contrib/terminal/browser Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1460,9 +1460,15 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
1460
1460
}
1461
1461
1462
1462
async sendText ( text : string , addNewLine : boolean ) : Promise < void > {
1463
+ // Apply bracketed paste sequences if the terminal has the mode enabled, this will prevent
1464
+ // the text from triggering keybindings https://github.com/microsoft/vscode/issues/153592
1465
+ if ( this . xterm ?. raw . modes . bracketedPasteMode ) {
1466
+ text = `\x1b[200~${ text } \x1b[201~` ;
1467
+ }
1468
+
1463
1469
// Normalize line endings to 'enter' press.
1464
1470
text = text . replace ( / \r ? \n / g, '\r' ) ;
1465
- if ( addNewLine && text . substr ( text . length - 1 ) !== '\r' ) {
1471
+ if ( addNewLine && text [ text . length - 1 ] !== '\r' ) {
1466
1472
text += '\r' ;
1467
1473
}
1468
1474
You can’t perform that action at this time.
0 commit comments