Don't autosave unmodified buffers (#32626)

Closes https://github.com/zed-industries/zed/issues/12091

Proper redo of https://github.com/zed-industries/zed/pull/32603

Release Notes:

- Fixed formatting effects not triggered when saving unmodified
singleton buffers

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
Kirill Bulatov
2025-06-12 22:12:14 +00:00
committed by GitHub
co-authored by Max Brunsfeld Cole Miller
parent cd018da1ad
commit cef0c415f6
17 changed files with 453 additions and 171 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ use gpui::{
use language::{Language, LanguageRegistry};
use project::{Project, ProjectEntryId, ProjectPath};
use ui::{Tooltip, prelude::*};
use workspace::item::{ItemEvent, TabContentParams};
use workspace::item::{ItemEvent, SaveOptions, TabContentParams};
use workspace::searchable::SearchableItemHandle;
use workspace::{Item, ItemHandle, Pane, ProjectItem, ToolbarItemLocation};
use workspace::{ToolbarItemEvent, ToolbarItemView};
@@ -782,7 +782,7 @@ impl Item for NotebookEditor {
// TODO
fn save(
&mut self,
_format: bool,
_options: SaveOptions,
_project: Entity<Project>,
_window: &mut Window,
_cx: &mut Context<Self>,