1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-03 11:56:29 +03:00

limit max html copy length

This commit is contained in:
Eugene Pankov 2020-04-19 16:22:54 +02:00
parent ca444bcf65
commit 2e12041688

View File

@ -167,10 +167,17 @@ export class XTermFrontend extends Frontend {
} }
copySelection (): void { copySelection (): void {
const text = this.getSelection()
if (text.length < 1024 * 32) {
require('electron').remote.clipboard.write({ require('electron').remote.clipboard.write({
text: this.getSelection(), text: this.getSelection(),
html: this.getSelectionAsHTML(), html: this.getSelectionAsHTML(),
}) })
} else {
require('electron').remote.clipboard.write({
text: this.getSelection(),
})
}
} }
clearSelection (): void { clearSelection (): void {