Re-render breadcrumbs when buffer has been reparsed

This commit is contained in:
Antonio Scandurra 2022-04-02 16:19:15 +02:00
parent d0a17f8c2c
commit b0b54365c7
2 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,8 @@ impl ToolbarItemView for Breadcrumbs {
.push(cx.subscribe(&editor, |_, _, event, cx| match event {
editor::Event::BufferEdited
| editor::Event::TitleChanged
| editor::Event::Saved => cx.notify(),
| editor::Event::Saved
| editor::Event::Reparsed => cx.notify(),
editor::Event::SelectionsChanged { local } if *local => cx.notify(),
_ => {}
}));

View File

@ -5860,6 +5860,7 @@ impl Editor {
self.refresh_code_actions(cx);
cx.emit(Event::BufferEdited);
}
language::Event::Reparsed => cx.emit(Event::Reparsed),
language::Event::Dirtied => cx.emit(Event::Dirtied),
language::Event::Saved => cx.emit(Event::Saved),
language::Event::FileHandleChanged => cx.emit(Event::TitleChanged),
@ -5987,6 +5988,7 @@ pub enum Event {
Activate,
BufferEdited,
Edited,
Reparsed,
Blurred,
Dirtied,
Saved,