From 4a577fff4a208fa877574069c8e8725ad66dd018 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Mon, 26 May 2025 21:35:00 -0400 Subject: [PATCH] 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. --- crates/agent/src/agent_diff.rs | 2 +- crates/editor/src/editor.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/agent/src/agent_diff.rs b/crates/agent/src/agent_diff.rs index cb6934bb4088c048e23513709c1262cd98095a84..1ae8eddb155557dc6dd11be67fa12e35de17352a 100644 --- a/crates/agent/src/agent_diff.rs +++ b/crates/agent/src/agent_diff.rs @@ -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") diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 4b3c46d4a675e0e1b308085c8c2918d834e08e19..2b1bfb09ed5818713ecd973bc7ee0de36a5e8e41 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -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")