Fix zoomed terminal pane issues on split (#21668)

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

* prevents zooming out the panel when any terminal pane is closed
* forces focus on new terminal panes, to prevent the workspace from
getting odd pane events in the background

Release Notes:

- (Preview only) Fixed zoomed terminal pane issues on split
This commit is contained in:
Kirill Bulatov 2024-12-07 10:39:01 +02:00 committed by GitHub
parent fa7dddd6b5
commit 14ba4a9c94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 87 additions and 28 deletions

View file

@ -214,8 +214,13 @@ async fn deserialize_pane_group(
.await;
let pane = panel
.update(cx, |_, cx| {
new_terminal_pane(workspace.clone(), project.clone(), cx)
.update(cx, |terminal_panel, cx| {
new_terminal_pane(
workspace.clone(),
project.clone(),
terminal_panel.active_pane.read(cx).is_zoomed(),
cx,
)
})
.log_err()?;
let active_item = serialized_pane.active_item;