use @electron/remote

This commit is contained in:
Eugene Pankov
2021-03-20 17:12:39 +01:00
parent 4a97cc4383
commit bd46b08c9d
16 changed files with 58 additions and 50 deletions

View File

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