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