Focus new item if pane was focused when removing previous active item

Previously, we were relying on the item getting blurred and the workspace
receiving focus, which would in turn focus the active pane. This doesn't
play well with docks because they aren't part of the workspace panes.
This commit is contained in:
Antonio Scandurra 2023-05-09 17:38:54 +02:00
parent 641f5d1107
commit 37d3ed5f5f

View file

@ -903,7 +903,8 @@ impl Pane {
// to activating the item to the left
.unwrap_or_else(|| item_index.min(self.items.len()).saturating_sub(1));
self.activate_item(index_to_activate, activate_pane, activate_pane, cx);
let should_activate = activate_pane || self.has_focus;
self.activate_item(index_to_activate, should_activate, should_activate, cx);
}
let item = self.items.remove(item_index);