Implement "join pane into next" (#16077)
Closes #12409 Release Notes: - Added "join pane into next" action ([#12409](https://github.com/zed-industries/zed/issues/12409)) https://github.com/zed-industries/zed/assets/727422/00cc8599-e5d6-4fb8-9f0d-9b232d2210ef --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
parent
f417893a7b
commit
b99bf92452
6 changed files with 238 additions and 26 deletions
|
@ -173,16 +173,16 @@ impl TabSwitcherDelegate {
|
|||
};
|
||||
cx.subscribe(&pane, |tab_switcher, _, event, cx| {
|
||||
match event {
|
||||
PaneEvent::AddItem { .. } | PaneEvent::RemovedItem { .. } | PaneEvent::Remove => {
|
||||
tab_switcher.picker.update(cx, |picker, cx| {
|
||||
let selected_item_id = picker.delegate.selected_item_id();
|
||||
picker.delegate.update_matches(cx);
|
||||
if let Some(item_id) = selected_item_id {
|
||||
picker.delegate.select_item(item_id, cx);
|
||||
}
|
||||
cx.notify();
|
||||
})
|
||||
}
|
||||
PaneEvent::AddItem { .. }
|
||||
| PaneEvent::RemovedItem { .. }
|
||||
| PaneEvent::Remove { .. } => tab_switcher.picker.update(cx, |picker, cx| {
|
||||
let selected_item_id = picker.delegate.selected_item_id();
|
||||
picker.delegate.update_matches(cx);
|
||||
if let Some(item_id) = selected_item_id {
|
||||
picker.delegate.select_item(item_id, cx);
|
||||
}
|
||||
cx.notify();
|
||||
}),
|
||||
_ => {}
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue