Add check to prevent closing pinned items (#50333)

Pinned items should not be closed when the close action is triggered.

Closes #50309

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed a bug where middle-clicking a pinned tab would close it.
9d6208b209Austin Cummings committed on 3/27/2026, 6:52:11 PM· committed by GitHubparent79b9cae
1 file changedLine totals unavailable