Don't save buffers by default when running tasks (#52976)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #52926
Follow-up to #48861
cc @SomeoneToIgnore

Release Notes:

- Edited buffers are no longer saved by default before running a task,
but you can still configure this using the "save" field in `tasks.json`.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
Justin SuandKirill Bulatov authored and GitHub committed 2026-04-02 13:09:29 +00:00
1 parent 123a29795d
commit 757ff791eb
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -50,9 +50,9 @@
"show_command": true,
// Which edited buffers to save before running the task:
// * `all` — save all edited buffers
// * `current` — save current buffer only
// * `current` — save currently active buffer only
// * `none` — don't save any buffers
"save": "all",
"save": "none",
// Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
// "tags": []
},
+1 -1
View File
@@ -127,11 +127,11 @@ pub enum HideStrategy {
#[derive(Default, Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum SaveStrategy {
#[default]
/// Save all edited buffers.
All,
/// Save the current buffer.
Current,
#[default]
/// Don't save any buffers.
None,
}
+2 -2
View File
@@ -53,9 +53,9 @@ Zed supports ways to spawn (and rerun) commands using its integrated [terminal](
"show_command": true,
// Which edited buffers to save before running the task:
// * `all` — save all edited buffers
// * `current` — save current buffer only
// * `current` — save currently active buffer only
// * `none` — don't save any buffers
"save": "all"
"save": "none"
// Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
// "tags": []
}