Make VT-100 sequences easier to understand

This commit is contained in:
Patrik Svensson
2021-03-28 17:04:03 +02:00
committed by Phil Scott
parent 20650f1e7e
commit 1ed7e65fcb
9 changed files with 275 additions and 26 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Text;
using Spectre.Console.Rendering;
using static Spectre.Console.AnsiSequences;
namespace Spectre.Console
{
@ -21,11 +22,11 @@ namespace Spectre.Console
public void Clear(bool home)
{
Write(new ControlSequence("\u001b[2J"));
Write(new ControlSequence(ED(2)));
if (home)
{
Cursor.SetPosition(0, 0);
Write(new ControlSequence(CUP(0, 0)));
}
}