fixed #9164 - only auto-open a new tab if there are no tabs recovered after startup

This commit is contained in:
Eugene 2024-03-11 21:20:51 +01:00
parent 49d05cc23b
commit bacb458df3
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -132,7 +132,9 @@ export class AutoOpenTabCLIHandler extends CLIHandler {
async handle (event: CLIEvent): Promise<boolean> { async handle (event: CLIEvent): Promise<boolean> {
if (!event.secondInstance && this.config.store.terminal.autoOpen && !this.config.store.enableWelcomeTab) { if (!event.secondInstance && this.config.store.terminal.autoOpen && !this.config.store.enableWelcomeTab) {
this.app.ready$.subscribe(() => { this.app.ready$.subscribe(() => {
this.terminal.openTab() if (this.app.tabs.length === 0) {
this.terminal.openTab()
}
}) })
return true return true
} }