fixed tab title recovery for split tabs - fixes #4810

This commit is contained in:
Eugene Pankov
2021-12-08 21:45:58 +01:00
parent b755346ac0
commit 433c7d33d9
5 changed files with 18 additions and 18 deletions

View File

@@ -90,6 +90,7 @@ class PTYDataQueue {
export class PTY {
private pty: nodePTY.IPty
private outputQueue: PTYDataQueue
exited = false
constructor (private id: string, private app: Application, ...args: any[]) {
this.pty = (nodePTY as any).spawn(...args)
@@ -101,7 +102,10 @@ export class PTY {
setImmediate(() => this.emit('data', data))
})
this.pty.on('data', data => this.outputQueue.push(Buffer.from(data)))
this.pty.onData(data => this.outputQueue.push(Buffer.from(data)))
this.pty.onExit(() => {
this.exited = true
})
}
getPID (): number {
@@ -144,7 +148,7 @@ export class PTYManager {
})
ipcMain.on('pty:exists', (event, id) => {
event.returnValue = !!this.ptys[id]
event.returnValue = !this.ptys[id]?.exited
})
ipcMain.on('pty:get-pid', (event, id) => {