From d304a49536d100f0e1f1cf63799e5e9c25b104cb Mon Sep 17 00:00:00 2001 From: Hojjat Date: Fri, 20 Feb 2026 15:09:56 -0700 Subject: [PATCH] fix: width 0.0 is valid,return ellipsized if there's non-zero content --- src/shape.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shape.rs b/src/shape.rs index 34e740b..3da6682 100644 --- a/src/shape.rs +++ b/src/shape.rs @@ -1546,7 +1546,7 @@ impl ShapeLine { direction: LayoutDirection, ) { let check_ellipsizing = matches!(ellipsize, Ellipsize::Start(_) | Ellipsize::End(_)) - && width_opt.is_some_and(|w| w > 0.0 && w.is_finite()); + && width_opt.is_some_and(|w| w.is_finite()); let max_width = width_opt.unwrap_or(f32::INFINITY); let span_count = spans.len();