1
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-06-23 12:59:54 +00:00

Revert "smart copying for Windows line breaks (fixes )"

This reverts commit fb502bc9269d0ef82e8b8d1251ae8e15324f91fa.
This commit is contained in:
Eugene Pankov 2020-05-02 15:44:20 +02:00
parent 76acbc6c9f
commit e116a42f8b
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

@ -167,28 +167,15 @@ export class XTermFrontend extends Frontend {
} }
copySelection (): void { copySelection (): void {
let text = this.getSelection() const 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
}
}
if (text.length < 1024 * 32) { if (text.length < 1024 * 32) {
require('electron').remote.clipboard.write({ require('electron').remote.clipboard.write({
text: text, text: this.getSelection(),
html: this.getSelectionAsHTML(), html: this.getSelectionAsHTML(),
}) })
} else { } else {
require('electron').remote.clipboard.write({ require('electron').remote.clipboard.write({
text: text, text: this.getSelection(),
}) })
} }
} }