Skip to content

Conversation

@phaistonian
Copy link
Contributor

image

Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I think we should support this feature but I think we should make this macOS only for now because I'm not sure if it's typical for this to behave this way on GTK. We can easily add it later.

I'll see if I can clean this up.

@mitchellh
Copy link
Contributor

Actually just going to remove the context menu for now, the tab view API call is fine.

@mitchellh mitchellh force-pushed the feat/close-tabs-right branch from fb758dd to 1387dbe Compare December 11, 2025 04:50
Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. I made some changes here:

  • Removed GTK UI (but kept binding action functionality)
  • Rename to "Close Tabs to the Right" instead of "on", because that's what Apple apps use
  • Change to selector comparison for tab bar context menu detection
  • Change to using an NSMenu extension so we can more easily add more stuff in the future
  • Ensure the target is the correct target so you can right click non-focused tabs
  • Added xmark icon to close targets to match Safari

@mitchellh mitchellh added this to the 1.3.0 milestone Dec 11, 2025
@tristan957
Copy link
Member

tristan957 commented Dec 11, 2025

Very cool that macOS supports this. I can see from Chrome on macOS that the string is exactly the same. Awesome.

@mitchellh mitchellh merged commit a531ea8 into ghostty-org:main Dec 11, 2025
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants