Skip to content

Commit

Permalink
PassphrasePrompt.cs: Support the delete key.
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-lucas6 committed Aug 11, 2024
1 parent ff0570a commit 9ff866a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kryptor/UI/PassphrasePrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static Span<byte> GetPassphrase()
if (!char.IsControl(consoleKeyInfo.KeyChar)) {
passphrase.Add(consoleKeyInfo.KeyChar);
}
else if (consoleKeyInfo.Key == ConsoleKey.Backspace && passphrase.Count > 0) {
else if (consoleKeyInfo.Key is ConsoleKey.Backspace or ConsoleKey.Delete && passphrase.Count > 0) {
passphrase.RemoveAt(passphrase.Count - 1);
}
}
Expand Down

0 comments on commit 9ff866a

Please sign in to comment.