autosave: Respect project autosave settings per file (#13369)

This fixes #13316 by checking whether there are any local workspace
settings for a given file.

Release Notes:

- Fixed `autosave` settings in project-specific settings file being
ignored. ([#13316](https://github.com/zed-industries/zed/issues/13316)).

Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Thorsten Ball
2024-06-24 14:56:22 +02:00
committed by GitHub
co-authored by Bennet
parent 3ee3c6a3bd
commit 40748b0a15
4 changed files with 38 additions and 17 deletions
+6
View File
@@ -70,6 +70,12 @@ pub const FS_WATCH_LATENCY: Duration = Duration::from_millis(100);
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash, PartialOrd, Ord)]
pub struct WorktreeId(usize);
impl From<WorktreeId> for usize {
fn from(value: WorktreeId) -> Self {
value.0
}
}
/// A set of local or remote files that are being opened as part of a project.
/// Responsible for tracking related FS (for local)/collab (for remote) events and corresponding updates.
/// Stores git repositories data and the diagnostics for the file(s).