mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
Merge eaa430843c into 09165c15dc
This commit is contained in:
commit
217eed72f8
1 changed files with 10 additions and 1 deletions
|
|
@ -317,7 +317,8 @@ impl TerminalPanel {
|
|||
if let Some(workspace) = workspace.upgrade() {
|
||||
let should_focus = workspace
|
||||
.update_in(&mut cx, |workspace, window, cx| {
|
||||
workspace.active_item(cx).is_none()
|
||||
!workspace.has_active_modal(window, cx)
|
||||
&& workspace.active_item(cx).is_none()
|
||||
&& workspace
|
||||
.is_dock_at_position_open(terminal_panel.position(window, cx), cx)
|
||||
})
|
||||
|
|
@ -905,6 +906,14 @@ impl TerminalPanel {
|
|||
)
|
||||
}));
|
||||
|
||||
let reveal_strategy = if workspace.has_active_modal(window, cx)
|
||||
&& matches!(reveal_strategy, RevealStrategy::Always)
|
||||
{
|
||||
RevealStrategy::NoFocus
|
||||
} else {
|
||||
reveal_strategy
|
||||
};
|
||||
|
||||
match reveal_strategy {
|
||||
RevealStrategy::Always => {
|
||||
workspace.focus_panel::<Self>(window, cx);
|
||||
|
|
|
|||
Loading…
Reference in a new issue