fixed line breaks when pasting on Windows (fixes #396)

This commit is contained in:
Eugene Pankov 2018-08-24 23:48:02 +02:00
parent a10c6e6251
commit 627d7402ca

View File

@ -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)
}