diff --git a/src/Spectre.Console/Rendering/Segment.cs b/src/Spectre.Console/Rendering/Segment.cs index c80cb0f..59994eb 100644 --- a/src/Spectre.Console/Rendering/Segment.cs +++ b/src/Spectre.Console/Rendering/Segment.cs @@ -550,42 +550,6 @@ namespace Spectre.Console.Rendering return result; } - internal static Segment TruncateWithEllipsis(string text, Style style, RenderContext context, int maxWidth) - { - if (text is null) - { - throw new ArgumentNullException(nameof(text)); - } - - if (style is null) - { - throw new ArgumentNullException(nameof(style)); - } - - if (context is null) - { - throw new ArgumentNullException(nameof(context)); - } - - var overflow = SplitOverflow(new Segment(text, style), Overflow.Ellipsis, context, maxWidth); - if (overflow.Count == 0) - { - if (maxWidth > 0) - { - return new Segment(text, style); - } - - // We got space for an ellipsis - return new Segment("…", style); - } - - return SplitOverflow( - new Segment(text, style), - Overflow.Ellipsis, - context, - maxWidth)[0]; - } - internal static List TruncateWithEllipsis(IEnumerable segments, RenderContext context, int maxWidth) { if (segments is null)