use crate::app_state::AppState;
pub fn editor_pre_save(ed: &mut crate::views::editor::EditorView, app: &mut AppState) {
ed.stop_file_watching();
if let Some(ref path) = ed.buffer.path {
app.file_watcher.unwatch(path).ok();
}
}
pub fn terminal_pre_save(tv: &mut crate::views::terminal::TerminalView, app: &mut AppState) {
app.project.save_terminal_state(&tv.to_state());
}
pub fn extension_config_pre_save(
ec: &mut crate::views::extension_config::ExtensionConfigView,
_app: &mut AppState,
) {
if ec.pending_save {
log::debug!("extension config pending save detected");
}
}