diff --git a/crates/gpui/src/text_system/line_layout.rs b/crates/gpui/src/text_system/line_layout.rs index a78c07fa26..f2379feded 100644 --- a/crates/gpui/src/text_system/line_layout.rs +++ b/crates/gpui/src/text_system/line_layout.rs @@ -90,6 +90,14 @@ impl LineLayout { } } + if self.len == 1 { + if x > self.width / 2. { + return 1; + } else { + return 0; + } + } + self.len }