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:
parent
3ee3c6a3bd
commit
40748b0a15
4 changed files with 38 additions and 17 deletions
|
@ -3502,11 +3502,11 @@ impl Workspace {
|
|||
if let Some(item) = pane.active_item() {
|
||||
item.workspace_deactivated(cx);
|
||||
}
|
||||
if matches!(
|
||||
WorkspaceSettings::get_global(cx).autosave,
|
||||
AutosaveSetting::OnWindowChange | AutosaveSetting::OnFocusChange
|
||||
) {
|
||||
for item in pane.items() {
|
||||
for item in pane.items() {
|
||||
if matches!(
|
||||
item.workspace_settings(cx).autosave,
|
||||
AutosaveSetting::OnWindowChange | AutosaveSetting::OnFocusChange
|
||||
) {
|
||||
Pane::autosave_item(item.as_ref(), self.project.clone(), cx)
|
||||
.detach_and_log_err(cx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue