don't copy text if empty

This commit is contained in:
Eugene Pankov 2021-09-17 00:23:30 +02:00
parent 3a615a070b
commit 8d3f4137a1
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4

View file

@ -206,6 +206,9 @@ export class XTermFrontend extends Frontend {
copySelection (): void { copySelection (): void {
const text = this.getSelection() const text = this.getSelection()
if (!text.trim().length) {
return
}
if (text.length < 1024 * 32) { if (text.length < 1024 * 32) {
this.platformService.setClipboard({ this.platformService.setClipboard({
text: this.getSelection(), text: this.getSelection(),