Re-render breadcrumbs on save or when the editor title changes
This commit is contained in:
parent
fb2ae84719
commit
9225629208
1 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,9 @@ impl ToolbarItemView for Breadcrumbs {
|
||||||
if let Some(editor) = item.act_as::<Editor>(cx) {
|
if let Some(editor) = item.act_as::<Editor>(cx) {
|
||||||
self.subscriptions
|
self.subscriptions
|
||||||
.push(cx.subscribe(&editor, |_, _, event, cx| match event {
|
.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(),
|
editor::Event::SelectionsChanged { local } if *local => cx.notify(),
|
||||||
_ => {}
|
_ => {}
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue