clear terminal properly on re-run

This commit is contained in:
Matt Parker
2025-08-10 00:50:22 +10:00
parent 02f789179f
commit 7c70448dc3
3 changed files with 9 additions and 5 deletions

View File

@@ -31,6 +31,10 @@
private HashSet<string> _addons = ["addon-fit"];
public async Task Write(byte[] line)
{
await _terminalRef.Write(line);
}
public async Task Write(string line)
{
await _terminalRef.Write(line);
@@ -40,7 +44,7 @@
{
if (_terminalRef is not null)
{
await _terminalRef.Clear();
await _terminalRef.Reset();
await InvokeAsync(StateHasChanged);
}
}