From 1e5aab564e4f3bbc8fc44f67f68e3fed8be1291b Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sun, 9 Dec 2018 01:10:42 -0600 Subject: [PATCH] now accomodates for whatever was already on the line. --- RecrownedAthenaeum.ConsoleTools/ConsoleUtilities.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecrownedAthenaeum.ConsoleTools/ConsoleUtilities.cs b/RecrownedAthenaeum.ConsoleTools/ConsoleUtilities.cs index 3999d18..1837265 100644 --- a/RecrownedAthenaeum.ConsoleTools/ConsoleUtilities.cs +++ b/RecrownedAthenaeum.ConsoleTools/ConsoleUtilities.cs @@ -15,12 +15,12 @@ namespace RecrownedAthenaeum.Tools public static string WrapMessageToConsoleWidth(string message) { - string[] words = message.Replace("\t", "").Split(' '); + string[] words = message.Split(' '); StringBuilder stringBuilder = new StringBuilder(); int currentLineSize = 0; for (int i = 0; i < words.Length; i++) { - if (currentLineSize + words[i].Length >= Console.BufferWidth) + if (currentLineSize + words[i].Length >= Console.BufferWidth - Console.CursorLeft) { currentLineSize = 0; stringBuilder.AppendLine();