mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-19 18:07:58 +00:00
fixed tab title recovery for split tabs - fixes #4810
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user