Fix AI panel unexpectedly closing in zoom mode during scrolling (#33430)
Modified zoom handling logic in workspace.rs to be more conservative: - Only dismiss zoomed panels when the focused pane is itself zoomed - Remove zoom dismissal when revealing docks This prevents the AI panel from closing during scroll operations when focus temporarily shifts between components.
This commit is contained in:
parent
32906bfa7c
commit
4c3420f3f6
1 changed files with 9 additions and 8 deletions
|
@ -2743,10 +2743,6 @@ impl Workspace {
|
|||
}
|
||||
});
|
||||
|
||||
if reveal_dock {
|
||||
self.dismiss_zoomed_items_to_reveal(Some(dock_side), window, cx);
|
||||
}
|
||||
|
||||
if focus_center {
|
||||
self.active_pane
|
||||
.update(cx, |pane, cx| window.focus(&pane.focus_handle(cx)))
|
||||
|
@ -3650,14 +3646,19 @@ impl Workspace {
|
|||
self.last_active_center_pane = Some(pane.downgrade());
|
||||
}
|
||||
|
||||
self.dismiss_zoomed_items_to_reveal(None, window, cx);
|
||||
// Handle zoom state changes
|
||||
if pane.read(cx).is_zoomed() {
|
||||
// This pane is zoomed, dismiss other zoomed items
|
||||
self.dismiss_zoomed_items_to_reveal(None, window, cx);
|
||||
self.zoomed = Some(pane.downgrade().into());
|
||||
} else {
|
||||
self.zoomed_position = None;
|
||||
cx.emit(Event::ZoomChanged);
|
||||
} else {
|
||||
// No zoomed items
|
||||
self.zoomed = None;
|
||||
self.zoomed_position = None;
|
||||
}
|
||||
self.zoomed_position = None;
|
||||
cx.emit(Event::ZoomChanged);
|
||||
|
||||
self.update_active_view_for_followers(window, cx);
|
||||
pane.update(cx, |pane, _| {
|
||||
pane.track_alternate_file_items();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue