mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
Make VT-100 sequences easier to understand
This commit is contained in:

committed by
Phil Scott

parent
20650f1e7e
commit
1ed7e65fcb
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user