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.
This commit is contained in:
Yara 🏳️‍⚧️ authored and GitHub committed 2026-04-23 16:28:05 +00:00
1 parent 205d3c132f
commit ffce7c8093
1 file changed
+5 -4
+5 -4
View File
@@ -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();
}