From b82d5789220398d00c5262a1138b5787023f9a18 Mon Sep 17 00:00:00 2001 From: Mandeep Cheema Date: Tue, 26 Aug 2025 12:41:17 +0100 Subject: [PATCH] Autosave files on close when setting is `afterDelay` fixes #35524 --- crates/search/src/project_search.rs | 4 +++- crates/workspace/src/pane.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 8ac12588af..77929599f1 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -1069,7 +1069,9 @@ impl ProjectSearchView { let will_autosave = can_autosave && matches!( autosave_setting, - AutosaveSetting::OnFocusChange | AutosaveSetting::OnWindowChange + AutosaveSetting::OnFocusChange + | AutosaveSetting::OnWindowChange + | AutosaveSetting::AfterDelay { .. } ); let is_dirty = self.is_dirty(cx); diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index fe8014d9f7..0df2acb8cb 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -2063,7 +2063,9 @@ impl Pane { let will_autosave = cx.update(|_window, cx| { matches!( item.workspace_settings(cx).autosave, - AutosaveSetting::OnFocusChange | AutosaveSetting::OnWindowChange + AutosaveSetting::OnFocusChange + | AutosaveSetting::OnWindowChange + | AutosaveSetting::AfterDelay { .. } ) && item.can_autosave(cx) })?; if !will_autosave {