Skip to content

Commit

Permalink
fixed Eugeny#9164 - only auto-open a new tab if there are no tabs rec…
Browse files Browse the repository at this point in the history
…overed after startup
  • Loading branch information
Eugeny committed Mar 11, 2024
1 parent 49d05cc commit bacb458
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tabby-local/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ export class AutoOpenTabCLIHandler extends CLIHandler {
async handle (event: CLIEvent): Promise<boolean> {
if (!event.secondInstance && this.config.store.terminal.autoOpen && !this.config.store.enableWelcomeTab) {
this.app.ready$.subscribe(() => {
this.terminal.openTab()
if (this.app.tabs.length === 0) {
this.terminal.openTab()
}
})
return true
}
Expand Down

0 comments on commit bacb458

Please sign in to comment.