mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Update toolbar and automatically unfollow when navigating back and forth
This commit is contained in:
parent
c39de1f9dc
commit
d0a17f8c2c
1 changed files with 4 additions and 1 deletions
|
@ -207,13 +207,16 @@ impl Pane {
|
||||||
|
|
||||||
let prev_active_index = mem::replace(&mut pane.active_item_index, index);
|
let prev_active_index = mem::replace(&mut pane.active_item_index, index);
|
||||||
pane.focus_active_item(cx);
|
pane.focus_active_item(cx);
|
||||||
|
pane.update_toolbar(cx);
|
||||||
|
cx.emit(Event::ActivateItem { local: true });
|
||||||
|
cx.notify();
|
||||||
|
|
||||||
let mut navigated = prev_active_index != pane.active_item_index;
|
let mut navigated = prev_active_index != pane.active_item_index;
|
||||||
if let Some(data) = entry.data {
|
if let Some(data) = entry.data {
|
||||||
navigated |= pane.active_item()?.navigate(data, cx);
|
navigated |= pane.active_item()?.navigate(data, cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if navigated {
|
if navigated {
|
||||||
cx.notify();
|
|
||||||
break None;
|
break None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue