Skip to content

Commit

Permalink
Update AnsiConsoleExtensions.Input.cs
Browse files Browse the repository at this point in the history
Don't erase the prompt text when backspacing on a secret prompt with a null mask
  • Loading branch information
ChrisPulman committed Feb 16, 2024
1 parent 8fd26fb commit dafae34
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ internal static async Task<string> ReadLine(this IAnsiConsole console, Style? st
if (text.Length > 0)
{
text = text.Substring(0, text.Length - 1);
console.Write("\b \b");
if (mask != null)
{
console.Write("\b \b");
}
}

continue;
Expand Down

0 comments on commit dafae34

Please sign in to comment.