From d511cf4ac83cc7f12dbc9680a584b11c40dde106 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 5 Oct 2025 10:36:38 -0400 Subject: [PATCH] Fix some odd logic decisions --- SabreTools.CommandLine/Inputs/UserInput.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SabreTools.CommandLine/Inputs/UserInput.cs b/SabreTools.CommandLine/Inputs/UserInput.cs index d72abbc..2b5361f 100644 --- a/SabreTools.CommandLine/Inputs/UserInput.cs +++ b/SabreTools.CommandLine/Inputs/UserInput.cs @@ -711,13 +711,11 @@ namespace SabreTools.CommandLine.Inputs // Normalize the description for output string longDescription = _longDescription!.Replace("\r\n", "\n"); - // Create the output list - List outputList = []; - // Get the width of the console for wrapping reference int width = (Console.WindowWidth == 0 ? 80 : Console.WindowWidth) - 1; - // Prepare the output string + // Prepare the outputs + List outputList = []; var output = new StringBuilder(); output.Append(CreatePadding(pre + 4)); @@ -774,6 +772,11 @@ namespace SabreTools.CommandLine.Inputs else { outputList.Add(output.ToString()); +#if NET20 || NET35 + output = new(); +#else + output.Clear(); +#endif output.Append(CreatePadding(pre + 4)); output.Append((output.Length == pre + 4 ? string.Empty : " ") + segment); }