Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: tabs respawn by themselves when closed via "exit" #2278

Open
Cooksauce opened this issue Sep 20, 2024 · 1 comment
Open

macOS: tabs respawn by themselves when closed via "exit" #2278

Cooksauce opened this issue Sep 20, 2024 · 1 comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/macos

Comments

@Cooksauce
Copy link
Collaborator

Cooksauce commented Sep 20, 2024

Details:

  • This refers to behavior configured by: quit-after-last-window-closed = true
  • I've hit this off-and-on for a bit... but still not sure exactly how to reproduce it

Rough Sequence of Events:

  1. ghostty is completely closed
  2. open ghostty
  3. in tab[0] --> ls (run some command)
  4. in tab[0] --> cmd+t --> new tab opens
  5. in tab[1] --> ls
  6. in tab[1] --> run: exit --> tab[1] closes
  7. in tab[0] --> run: exit --> tab[0] closes --> ghostty closes (as configured)
  8. open ghostty --> tab[0] and tab[1] respawn (unexpected behavior)
    • the tabs are opened back to the (non-default) directory they were in when closed
    • at this point, repeating steps 6 thru 8 continue to result in respawns
  9. in tab[1] --> quit ghostty via traditional cmd+q
  10. open ghostty --> opens as expected with a single tab

Feels like it could be related to #2273

@Cooksauce Cooksauce changed the title macOS: tabs respawn by themselves when closed via "exit" command macOS: tabs respawn by themselves when closed via "exit" Sep 20, 2024
@mitchellh
Copy link
Contributor

This is related to window-save-state. We unfortunately don't have control over when macOS decides to save window state and sometimes previously closed windows return. We haven't figured out a way to make this perfect. For now, you can set window-save-state = never to fix this.

@mitchellh mitchellh added gui GUI or app issue regardless of platform (i.e. Swift, GTK) and removed bug labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/macos
Projects
None yet
Development

No branches or pull requests

2 participants