From 627d7402caf58567064cfc67718b473c8ceca0cf Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 24 Aug 2018 23:48:02 +0200 Subject: [PATCH] fixed line breaks when pasting on Windows (fixes #396) --- terminus-terminal/src/components/terminalTab.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terminus-terminal/src/components/terminalTab.component.ts b/terminus-terminal/src/components/terminalTab.component.ts index 96fb0185..d9b616ab 100644 --- a/terminus-terminal/src/components/terminalTab.component.ts +++ b/terminus-terminal/src/components/terminalTab.component.ts @@ -302,7 +302,11 @@ export class TerminalTabComponent extends BaseTabComponent { if (this.config.store.terminal.bracketedPaste) { data = '\x1b[200~' + data + '\x1b[201~' } - data = data.replace(/\n/g, '\r') + if (this.hostApp.platform === Platform.Windows) { + data = data.replace(/\r\n/g, '\r') + } else { + data = data.replace(/\n/g, '\r') + } this.sendInput(data) }