From dbe41823d9f5e720d35b7f40573296bb8cfe455d Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 2 Dec 2024 20:46:28 +0200 Subject: [PATCH] Use proper terminal item for splitting context (#21415) Closes https://github.com/zed-industries/zed/issues/21411 Release Notes: - N/A --- crates/terminal_view/src/terminal_panel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rs index 532d5d90400f45..b3804354c45f39 100644 --- a/crates/terminal_view/src/terminal_panel.rs +++ b/crates/terminal_view/src/terminal_panel.rs @@ -131,8 +131,8 @@ impl TerminalPanel { terminal_pane.update(cx, |pane, cx| { pane.set_render_tab_bar_buttons(cx, move |pane, cx| { let split_context = pane - .items() - .find_map(|item| item.downcast::()) + .active_item() + .and_then(|item| item.downcast::()) .map(|terminal_view| terminal_view.read(cx).focus_handle.clone()); if !pane.has_focus(cx) && !pane.context_menu_focused(cx) { return (None, None);