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.

git: Disable "stage all" checkbox when no entries (#23608)

Cole Miller9d8d21a4dc80
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs
index bb665df016a..65b0096b73f 100644
--- a/crates/git_ui/src/git_panel.rs
+++ b/crates/git_ui/src/git_panel.rs
@@ -829,6 +829,7 @@ impl GitPanel {
Tooltip::text("Stage all changes", cx)
}
})
+ .disabled(entry_count == 0)
.on_click(cx.listener(move |git_panel, _, cx| match all_staged {
true => git_panel.unstage_all(&UnstageAll, cx),
false => git_panel.stage_all(&StageAll, cx),