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:
parent
ca444bcf65
commit
2e12041688
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user