mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-02 01:03:32 +01:00
Add support for moving the cursor
This commit is contained in:
committed by
Patrik Svensson
parent
93d1971f48
commit
a1d11e9d0c
@@ -17,6 +17,7 @@ namespace Spectre.Console.Tests
|
||||
public Encoding Encoding => _console.Encoding;
|
||||
public int Width { get; }
|
||||
public int Height => _console.Height;
|
||||
public IAnsiConsoleCursor Cursor => _console.Cursor;
|
||||
|
||||
public TestableAnsiConsole(ColorSystem system, AnsiSupport ansi = AnsiSupport.Yes, int width = 80)
|
||||
{
|
||||
@@ -37,6 +38,11 @@ namespace Spectre.Console.Tests
|
||||
_writer?.Dispose();
|
||||
}
|
||||
|
||||
public void Clear(bool home)
|
||||
{
|
||||
_console.Clear(home);
|
||||
}
|
||||
|
||||
public void Write(Segment segment)
|
||||
{
|
||||
_console.Write(segment);
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Spectre.Console.Tests.Tools
|
||||
|
||||
public Capabilities Capabilities => _console.Capabilities;
|
||||
public Encoding Encoding => _console.Encoding;
|
||||
public IAnsiConsoleCursor Cursor => _console.Cursor;
|
||||
public int Width { get; }
|
||||
public int Height => _console.Height;
|
||||
|
||||
@@ -36,6 +37,11 @@ namespace Spectre.Console.Tests.Tools
|
||||
_writer?.Dispose();
|
||||
}
|
||||
|
||||
public void Clear(bool home)
|
||||
{
|
||||
_console.Clear(home);
|
||||
}
|
||||
|
||||
public void Write(Segment segment)
|
||||
{
|
||||
_console.Write(segment);
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Spectre.Console.Tests
|
||||
{
|
||||
public Capabilities Capabilities { get; }
|
||||
public Encoding Encoding { get; }
|
||||
public IAnsiConsoleCursor Cursor => throw new NotSupportedException();
|
||||
|
||||
public int Width { get; }
|
||||
public int Height { get; }
|
||||
@@ -42,6 +43,10 @@ namespace Spectre.Console.Tests
|
||||
Writer.Dispose();
|
||||
}
|
||||
|
||||
public void Clear(bool home)
|
||||
{
|
||||
}
|
||||
|
||||
public void Write(Segment segment)
|
||||
{
|
||||
if (segment is null)
|
||||
|
||||
Reference in New Issue
Block a user