mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
Add method to write VT/ANSI control codes
Adds a new extension method IAnsiConsole.WriteAnsi that writes VT/ANSI control codes to the console. If VT/ANSI control codes are not supported, nothing will be written.
This commit is contained in:

committed by
Phil Scott

parent
91f910326c
commit
3463dde543
@ -22,12 +22,12 @@ namespace Spectre.Console
|
||||
|
||||
public void Clear(bool home)
|
||||
{
|
||||
Write(new ControlSequence(ED(2)));
|
||||
Write(new ControlSequence(ED(3)));
|
||||
Write(new ControlCode(ED(2)));
|
||||
Write(new ControlCode(ED(3)));
|
||||
|
||||
if (home)
|
||||
{
|
||||
Write(new ControlSequence(CUP(1, 1)));
|
||||
Write(new ControlCode(CUP(1, 1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user