From ffce7c8093eab0bad58df6a80614f28a3495dcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yara=20=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7=EF=B8=8F?= Date: Thu, 23 Apr 2026 18:28:05 +0200 Subject: [PATCH] Fix gutter_context_menu not showing (#54574) To hide the gutter_context_menu in collab notes (where it would be empty anyway) we checked for the collaboration_hub. But that is unrelated to collab notes it turns out :) So now we check for the presence of a project which is always false for collab notes. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #54559 Release Notes: - N/A Fixed context menu in the editor gutter not showing when there was a break-point set but breakpoints are not shown in the buffer. --- crates/editor/src/element.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index e76e1cd248..9f2cba7dff 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -895,7 +895,8 @@ impl EditorElement { let hitbox = &position_map.gutter_hitbox; if event.position.x <= hitbox.bounds.right() - gutter_right_padding - && editor.collaboration_hub.is_none() + // Don't show the gutter_context_menu in collab notes + && editor.project.is_some() { let point_for_position = position_map.point_for_position(event.position); editor.set_gutter_context_menu( @@ -1394,7 +1395,7 @@ impl EditorElement { indicator.is_active && start_row == valid_point.row() }); - let breakpoint_indicator = if gutter_hovered + let gutter_hover_button = if gutter_hovered && !is_on_diff_review_button_row && split_side != Some(SplitSide::Left) { @@ -1444,8 +1445,8 @@ impl EditorElement { None }; - if &breakpoint_indicator != &editor.gutter_hover_button.0 { - editor.gutter_hover_button.0 = breakpoint_indicator; + if &gutter_hover_button != &editor.gutter_hover_button.0 { + editor.gutter_hover_button.0 = gutter_hover_button; cx.notify(); }