git: Fix hunk controls blocking scrolling (#31476)
Cole Miller
created 6 months ago
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.
Change summary
crates/agent/src/agent_diff.rs | 2 +-
crates/editor/src/editor.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Detailed changes
@@ -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")
@@ -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")