Fix clearing console line.

This commit is contained in:
2019-08-15 18:49:18 +01:00
parent 976357596c
commit 8d45745ff8

View File

@@ -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');
}
}
}