git: Fix hunk controls blocking scrolling (#31476)

Thanks @mgsloan for introducing `stop_mouse_events_except_scroll` which
is exactly what we want here!

Release Notes:

- Fixed being unable to scroll editors when the cursor is positioned on
diff hunk controls.
This commit is contained in:
Cole Miller 2025-05-26 21:35:00 -04:00 committed by GitHub
parent 03071a9152
commit 4a577fff4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -699,7 +699,7 @@ fn render_diff_hunk_controls(
.rounded_b_md()
.bg(cx.theme().colors().editor_background)
.gap_1()
.occlude()
.stop_mouse_events_except_scroll()
.shadow_md()
.children(vec![
Button::new(("reject", row as u64), "Reject")

View file

@ -21496,7 +21496,7 @@ fn render_diff_hunk_controls(
.rounded_b_lg()
.bg(cx.theme().colors().editor_background)
.gap_1()
.occlude()
.stop_mouse_events_except_scroll()
.shadow_md()
.child(if status.has_secondary_hunk() {
Button::new(("stage", row as u64), "Stage")