Move autosave logic up into Workspace and Pane

This commit is contained in:
Antonio Scandurra 2022-07-06 16:11:06 +02:00
parent 980730a4e1
commit b937c1acec
7 changed files with 166 additions and 132 deletions

View file

@ -568,10 +568,11 @@ impl workspace::Item for ProjectDiagnosticsEditor {
}
fn should_update_tab_on_event(event: &Event) -> bool {
matches!(
event,
Event::Saved | Event::DirtyChanged | Event::TitleChanged
)
Editor::should_update_tab_on_event(event)
}
fn is_edit_event(event: &Self::Event) -> bool {
Editor::is_edit_event(event)
}
fn set_nav_history(&mut self, nav_history: ItemNavHistory, cx: &mut ViewContext<Self>) {