fix godot warning

This commit is contained in:
Matt Parker
2026-01-21 00:24:48 +10:00
parent e9b301543b
commit 29e59018fe
2 changed files with 2 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ public partial class BuildPanel : Control
private async Task OnBuildStarted(BuildStartedFlags _)
{
_terminal.ClearTerminal();
await this.InvokeAsync(() => _terminal.ClearTerminal());
_buildOutputChannelReader ??= _buildService.BuildTextWriter.ConsoleChannel.Reader;
}
}

View File

@@ -37,6 +37,7 @@ public partial class SharpIdeTerminal : Control
_previousArrayEndedInCr = text.Length > 0 && text[^1] == (byte)'\r';
}
[RequiresGodotUiThread]
public void ClearTerminal()
{
// .Clear removes all text except for the bottom row, so lets make sure we have a blank line, and cursor at start