crates/git_ui/src/project_diff.rs 🔗
@@ -947,6 +947,11 @@ impl Render for ProjectDiffToolbar {
&StageAndNext,
&focus_handle,
))
+ .disabled(
+ !button_states.prev_next
+ && !button_states.stage_all
+ && !button_states.unstage_all,
+ )
.on_click(cx.listener(|this, _, window, cx| {
this.dispatch_action(&StageAndNext, window, cx)
})),
@@ -958,6 +963,11 @@ impl Render for ProjectDiffToolbar {
&UnstageAndNext,
&focus_handle,
))
+ .disabled(
+ !button_states.prev_next
+ && !button_states.stage_all
+ && !button_states.unstage_all,
+ )
.on_click(cx.listener(|this, _, window, cx| {
this.dispatch_action(&UnstageAndNext, window, cx)
})),