Fixed weird console restore glitch

This commit is contained in:
Marcel Baumgartner 2024-04-17 07:31:56 +02:00
parent f3ad71e33f
commit 48e2e1eb98

View file

@ -77,11 +77,13 @@
var text = "";
foreach (var line in ServerConsole.Messages.TakeLast(50))
text += line + "\n\r";
{
var lineModified = line.Replace("\n", "\n\r");
text += lineModified;
}
await Terminal.Write(text);
ServerConsole.OnNewMessage += OnMessage;
ServerConsole.OnStatsChange += HandleStats;
ServerConsole.OnStateChange += HandleState;
@ -105,7 +107,7 @@
private async Task OnMessage(string message)
{
await Terminal.WriteLine(message);
await Terminal.Write(message + "\n\r");
}
private async Task SendCommand()