修复密码填写框无法退格的bug

This commit is contained in:
2026-02-02 20:53:49 +08:00
parent 6703e13aa8
commit 861558ee80

View File

@@ -581,6 +581,14 @@ namespace CMLeonOS
if (password.Length > 0)
{
password = password.Substring(0, password.Length - 1);
int cursorLeft = Console.CursorLeft;
int cursorTop = Console.CursorTop;
if (cursorLeft > 0)
{
Console.SetCursorPosition(cursorLeft - 1, cursorTop);
Console.Write(" ");
Console.SetCursorPosition(cursorLeft - 1, cursorTop);
}
}
}
else