优化Unix环境光标回显被关闭的问题

This commit is contained in:
nilaoda 2022-12-10 15:29:37 +08:00
parent 74959e3d7d
commit 38fb339f82
1 changed files with 6 additions and 1 deletions

View File

@ -49,7 +49,12 @@ namespace N_m3u8DL_RE
private static void Console_CancelKeyPress(object? sender, ConsoleCancelEventArgs e)
{
Logger.WarnMarkUp("Force Exit...");
try { Console.CursorVisible = true; } catch { }
try
{
Console.CursorVisible = true;
if (!OperatingSystem.IsWindows())
System.Diagnostics.Process.Start("stty", "echo");
} catch { }
Environment.Exit(0);
}