Add "New Center Terminal" to context menu (#53702)

Sven Vollmar created

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added "New Center Terminal" button to window context menu

"New Terminal" only opens a new terminal window in the dedicated
terminal view, while "New Center Terminal" opens a new terminal in the
currently active view.

"+"/"New..." context menu
<img width="487" height="318" alt="Screenshot_20260411_184840"
src="https://github.com/user-attachments/assets/7c1597cf-5638-4d76-a486-537033cb8da5"
/>

Right click context menu
<img width="422" height="386" alt="Screenshot_20260411_184904"
src="https://github.com/user-attachments/assets/4e557e21-8839-4226-b704-87e37fbd8f46"
/>

Change summary

crates/terminal_view/src/terminal_view.rs |  4 ++++
crates/workspace/src/pane.rs              | 10 +++++++---
2 files changed, 11 insertions(+), 3 deletions(-)

Detailed changes

crates/terminal_view/src/terminal_view.rs 🔗

@@ -507,6 +507,10 @@ impl TerminalView {
         let context_menu = ContextMenu::build(window, cx, |menu, _, _| {
             menu.context(self.focus_handle.clone())
                 .action("New Terminal", Box::new(NewTerminal::default()))
+                .action(
+                    "New Center Terminal",
+                    Box::new(NewCenterTerminal::default()),
+                )
                 .separator()
                 .action("Copy", Box::new(Copy))
                 .action("Paste", Box::new(Paste))

crates/workspace/src/pane.rs 🔗

@@ -1,7 +1,7 @@
 use crate::{
-    CloseWindow, NewFile, NewTerminal, OpenInTerminal, OpenOptions, OpenTerminal, OpenVisible,
-    SplitDirection, ToggleFileFinder, ToggleProjectSymbols, ToggleZoom, Workspace,
-    WorkspaceItemBuilder, ZoomIn, ZoomOut,
+    CloseWindow, NewCenterTerminal, NewFile, NewTerminal, OpenInTerminal, OpenOptions,
+    OpenTerminal, OpenVisible, SplitDirection, ToggleFileFinder, ToggleProjectSymbols, ToggleZoom,
+    Workspace, WorkspaceItemBuilder, ZoomIn, ZoomOut,
     focus_follows_mouse::FocusFollowsMouse as _,
     invalid_item_view::InvalidItemView,
     item::{
@@ -4199,6 +4199,10 @@ fn default_render_tab_bar_buttons(
                             .action("Search Symbols", ToggleProjectSymbols.boxed_clone())
                             .separator()
                             .action("New Terminal", NewTerminal::default().boxed_clone())
+                            .action(
+                                "New Center Terminal",
+                                NewCenterTerminal::default().boxed_clone(),
+                            )
                     }))
                 }),
         )