Use proper terminal item for splitting context (#21415)

Closes https://github.com/zed-industries/zed/issues/21411

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2024-12-02 20:46:28 +02:00 committed by GitHub
parent 7c40824783
commit dbe41823d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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::<TerminalView>())
.active_item()
.and_then(|item| item.downcast::<TerminalView>())
.map(|terminal_view| terminal_view.read(cx).focus_handle.clone());
if !pane.has_focus(cx) && !pane.context_menu_focused(cx) {
return (None, None);