From d0a17f8c2cda6ffc8eeee68460a650c83a8e76e5 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 2 Apr 2022 16:16:47 +0200 Subject: [PATCH] Update toolbar and automatically unfollow when navigating back and forth --- crates/workspace/src/pane.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 33df9fd4c7..8dfe0f49a2 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -207,13 +207,16 @@ impl Pane { let prev_active_index = mem::replace(&mut pane.active_item_index, index); 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; if let Some(data) = entry.data { navigated |= pane.active_item()?.navigate(data, cx); } if navigated { - cx.notify(); break None; } }