From 296fa2d0896098376450b24586fce9d8e58af83e Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sun, 26 Apr 2020 10:58:26 -0700 Subject: [PATCH] Fix line spacing. --- ScreenCast.Core/Services/ChatHostService.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ScreenCast.Core/Services/ChatHostService.cs b/ScreenCast.Core/Services/ChatHostService.cs index 1db0c4ff..3c580eeb 100644 --- a/ScreenCast.Core/Services/ChatHostService.cs +++ b/ScreenCast.Core/Services/ChatHostService.cs @@ -66,9 +66,8 @@ namespace Remotely.ScreenCast.Core.Services while (NamedPipeStream.IsConnected) { - Console.SetCursorPosition(0, Math.Max(MaxCursorTop, Console.CursorTop)); - Console.WriteLine(); - Console.WriteLine(); + Console.SetCursorPosition(0, Math.Max(MaxCursorTop, Console.CursorTop) + 1); + MaxCursorTop = Console.CursorTop + 1; Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("You: "); Console.ForegroundColor = ConsoleColor.White; @@ -94,9 +93,7 @@ namespace Remotely.ScreenCast.Core.Services var message = await Reader.ReadLineAsync(); var left = Console.CursorLeft; var top = Console.CursorTop; - Console.SetCursorPosition(0, Math.Max(MaxCursorTop, Console.CursorTop)); - Console.WriteLine(); - Console.WriteLine(); + Console.SetCursorPosition(0, Math.Max(MaxCursorTop, Console.CursorTop) + 1); var split = message.Split(":", 2); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write($"{split[0]}: ");