From 8d45745ff801c4a6ea2c836d61cc98ba822e4825 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 15 Aug 2019 18:49:18 +0100 Subject: [PATCH] Fix clearing console line. --- DiscImageChef/Progress.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/DiscImageChef/Progress.cs b/DiscImageChef/Progress.cs index f2863870c..69d18f9d6 100644 --- a/DiscImageChef/Progress.cs +++ b/DiscImageChef/Progress.cs @@ -95,13 +95,7 @@ namespace DiscImageChef static void ClearCurrentConsoleLine() { - int currentLineCursor = System.Console.CursorTop; - - if(System.Console.CursorTop > System.Console.WindowHeight || System.Console.CursorTop < 0) return; - - System.Console.SetCursorPosition(0, System.Console.CursorTop); - System.Console.Write(new string(' ', System.Console.WindowWidth)); - System.Console.SetCursorPosition(0, currentLineCursor); + System.Console.Write('\r' + new string(' ', System.Console.WindowWidth - 1) + '\r'); } } } \ No newline at end of file