Re-render breadcrumbs on save or when the editor title changes

This commit is contained in:
Antonio Scandurra 2022-04-02 15:51:59 +02:00
parent fb2ae84719
commit 9225629208

View File

@ -99,7 +99,9 @@ impl ToolbarItemView for Breadcrumbs {
if let Some(editor) = item.act_as::<Editor>(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(),
_ => {}
}));