diff --git a/ArchiSteamFarm/Core/OS.cs b/ArchiSteamFarm/Core/OS.cs index f919e69201970..d130431140b98 100644 --- a/ArchiSteamFarm/Core/OS.cs +++ b/ArchiSteamFarm/Core/OS.cs @@ -276,8 +276,13 @@ internal static void WindowsStopFlashingConsoleWindow() { } private static void MinimizeConsoleWindow() { - // Will work if the terminal supports XTWINOPS sequences, reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html - Console.Write('\x1b' + @"[2;2;2t\r"); + (_, int top) = Console.GetCursorPosition(); + + // Will work if the terminal supports XTWINOPS "iconify" escape sequence, reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html + Console.Write('\x1b' + @"[2;0;0t"); + + // Reset cursor position if terminal outputs escape sequences as-is + Console.SetCursorPosition(0, top); // Fallback if we're using conhost on Windows if (OperatingSystem.IsWindows()) {