Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Justin Sua7248e8c006a
diff --git a/assets/settings/initial_tasks.json b/assets/settings/initial_tasks.json
index 0d6f4471320..bb6c9c04ae1 100644
--- a/assets/settings/initial_tasks.json
+++ b/assets/settings/initial_tasks.json
@@ -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": []
},
diff --git a/crates/task/src/task_template.rs b/crates/task/src/task_template.rs
index 2f74d84e500..25fde261f10 100644
--- a/crates/task/src/task_template.rs
+++ b/crates/task/src/task_template.rs
@@ -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,
}
diff --git a/docs/src/tasks.md b/docs/src/tasks.md
index b4c9ba8a2ab..3bbef85e976 100644
--- a/docs/src/tasks.md
+++ b/docs/src/tasks.md
@@ -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": []
}