Fix issues with adjacent diff hunks (#25367)

Closes #ISSUE

Release Notes:

- Fixed being unable to toggle diff hunks with the mouse in some cases
This commit is contained in:
Cole Miller 2025-02-21 19:07:04 -05:00 committed by GitHub
parent 4118f42d61
commit ef53f7af22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 193 additions and 39 deletions

View file

@ -547,7 +547,7 @@ impl EditorElement {
let mut modifiers = event.modifiers;
if let Some(hovered_hunk) = hovered_hunk {
editor.toggle_diff_hunks_in_ranges_narrow(vec![hovered_hunk], cx);
editor.toggle_single_diff_hunk(hovered_hunk, cx);
cx.notify();
return;
} else if gutter_hitbox.is_hovered(window) {