Do not activate inactive tabs when pinning or unpinning
Closes https://github.com/zed-industries/zed/issues/32024 Release Notes: - Fixed a bug where inactive tabs would be activated when pinning or unpinning.
This commit is contained in:
parent
79b1dd7db8
commit
2db2271e3c
4 changed files with 212 additions and 35 deletions
|
@ -3820,7 +3820,7 @@ impl Workspace {
|
|||
};
|
||||
|
||||
let new_pane = self.add_pane(window, cx);
|
||||
move_item(&from, &new_pane, item_id_to_move, 0, window, cx);
|
||||
move_item(&from, &new_pane, item_id_to_move, 0, true, window, cx);
|
||||
self.center
|
||||
.split(&pane_to_split, &new_pane, split_direction)
|
||||
.unwrap();
|
||||
|
@ -7515,6 +7515,7 @@ pub fn move_item(
|
|||
destination: &Entity<Pane>,
|
||||
item_id_to_move: EntityId,
|
||||
destination_index: usize,
|
||||
activate: bool,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) {
|
||||
|
@ -7538,8 +7539,18 @@ pub fn move_item(
|
|||
|
||||
// This automatically removes duplicate items in the pane
|
||||
destination.update(cx, |destination, cx| {
|
||||
destination.add_item(item_handle, true, true, Some(destination_index), window, cx);
|
||||
window.focus(&destination.focus_handle(cx))
|
||||
destination.add_item_inner(
|
||||
item_handle,
|
||||
activate,
|
||||
activate,
|
||||
activate,
|
||||
Some(destination_index),
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
if activate {
|
||||
window.focus(&destination.focus_handle(cx))
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue