From e116a42f8b38fd8d335d2991769eaa2268ae160c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 2 May 2020 15:44:20 +0200 Subject: [PATCH] Revert "smart copying for Windows line breaks (fixes #1558)" This reverts commit fb502bc9269d0ef82e8b8d1251ae8e15324f91fa. --- .../src/frontends/xtermFrontend.ts | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/terminus-terminal/src/frontends/xtermFrontend.ts b/terminus-terminal/src/frontends/xtermFrontend.ts index d461315b..0feeab6d 100644 --- a/terminus-terminal/src/frontends/xtermFrontend.ts +++ b/terminus-terminal/src/frontends/xtermFrontend.ts @@ -167,28 +167,15 @@ export class XTermFrontend extends Frontend { } copySelection (): void { - let text = this.getSelection() - let lines = text.split('\n') - if (lines.some(x => x.length === this.xterm.cols)) { - text = '' - let lastLineWraps = false - for (let line of lines) { - if (!lastLineWraps) { - text += '\n' - } - text += line - lastLineWraps = line.length === this.xterm.cols - } - } - + const text = this.getSelection() if (text.length < 1024 * 32) { require('electron').remote.clipboard.write({ - text: text, + text: this.getSelection(), html: this.getSelectionAsHTML(), }) } else { require('electron').remote.clipboard.write({ - text: text, + text: this.getSelection(), }) } }