faster tab creation

This commit is contained in:
Eugene Pankov
2018-09-20 12:46:50 +02:00
parent 6fa5ab5eb2
commit 6bc2d18f3c
4 changed files with 17 additions and 7 deletions

View File

@@ -199,7 +199,7 @@ export class TerminalTabComponent extends BaseTabComponent {
}
})
this.contextMenu = this.electron.remote.Menu.buildFromTemplate([
this.contextMenu = [
{
label: 'New terminal',
click: () => {
@@ -227,7 +227,7 @@ export class TerminalTabComponent extends BaseTabComponent {
})
}
},
])
]
}
detachTermContainerHandlers () {
@@ -249,9 +249,7 @@ export class TerminalTabComponent extends BaseTabComponent {
if (event.type === 'mousedown') {
if (event.which === 3) {
if (this.config.store.terminal.rightClick === 'menu') {
this.contextMenu.popup({
async: true,
})
this.hostApp.popupContextMenu(this.contextMenu)
} else if (this.config.store.terminal.rightClick === 'paste') {
this.paste()
}