Browse Source

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

Eugene 1 year ago
parent
commit
bacb458df3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tabby-local/src/cli.ts

+ 3 - 1
tabby-local/src/cli.ts

@@ -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
         }