Properly ignore control characters when adding input in CLI and Terminal processes

This commit is contained in:
Stone_Red
2026-06-10 03:03:28 +02:00
parent f2fd0d9c91
commit 98e4f73cfe
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -41,8 +41,11 @@ internal class CliProcess() : Process("Cli")
break;
default:
currentInput += key.KeyChar;
Console.Write(key.KeyChar);
if (!char.IsControl(key.KeyChar))
{
currentInput += key.KeyChar;
Console.Write(key.KeyChar);
}
break;
}
}