From 92256292081c9b18c0fde68dd0a0f46ca90dd807 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 2 Apr 2022 15:51:59 +0200 Subject: [PATCH] Re-render breadcrumbs on save or when the editor title changes --- crates/breadcrumbs/src/breadcrumbs.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/breadcrumbs/src/breadcrumbs.rs b/crates/breadcrumbs/src/breadcrumbs.rs index ce32fb2272..7085712f8c 100644 --- a/crates/breadcrumbs/src/breadcrumbs.rs +++ b/crates/breadcrumbs/src/breadcrumbs.rs @@ -99,7 +99,9 @@ impl ToolbarItemView for Breadcrumbs { if let Some(editor) = item.act_as::(cx) { self.subscriptions .push(cx.subscribe(&editor, |_, _, event, cx| match event { - editor::Event::BufferEdited => cx.notify(), + editor::Event::BufferEdited + | editor::Event::TitleChanged + | editor::Event::Saved => cx.notify(), editor::Event::SelectionsChanged { local } if *local => cx.notify(), _ => {} }));