1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-04 07:39:47 +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 {
require('electron').remote.clipboard.write({ const text = this.getSelection()
text: this.getSelection(), if (text.length < 1024 * 32) {
html: this.getSelectionAsHTML(), require('electron').remote.clipboard.write({
}) text: this.getSelection(),
html: this.getSelectionAsHTML(),
})
} else {
require('electron').remote.clipboard.write({
text: this.getSelection(),
})
}
} }
clearSelection (): void { clearSelection (): void {