From d793da8f19f22f84c627a8894b94e36b239545de Mon Sep 17 00:00:00 2001 From: WEGFan Date: Mon, 6 Sep 2021 01:39:56 +0800 Subject: [PATCH] Fix lines not shown in console if logged after scroll up and clear lines --- Celeste.Mod.mm/Patches/Monocle/Commands.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Celeste.Mod.mm/Patches/Monocle/Commands.cs b/Celeste.Mod.mm/Patches/Monocle/Commands.cs index 514c51203..fc8cb6988 100644 --- a/Celeste.Mod.mm/Patches/Monocle/Commands.cs +++ b/Celeste.Mod.mm/Patches/Monocle/Commands.cs @@ -436,6 +436,7 @@ public void ReloadCommandsList() { } drawCommands.Insert(0, new patch_Line(text, color)); int maxCommandLines = Math.Max(CoreModule.Settings.ExtraCommandHistoryLines + (Engine.Instance.Window.ClientBounds.Height - 100) / 30, 0); + firstLineIndexToDraw = Calc.Clamp(firstLineIndexToDraw, 0, Math.Max(drawCommands.Count - 1, 0)); while (drawCommands.Count > maxCommandLines) { drawCommands.RemoveAt(drawCommands.Count - 1); }