diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index fbdbf66f1f5b111dc51196b207f67778f676d436..86dbfe61d7df4a8a1b74ef4cea773e756162c590 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -5791,6 +5791,10 @@ impl EditorElement { let x = text_hitbox.bounds.right() - right_margin - px(10.) - size.width; + if x < text_hitbox.bounds.left() { + continue; + } + let bounds = Bounds::new(gpui::Point::new(x, y), size); control_bounds.push((display_row_range.start, bounds));