Added line decoration renderer.
This commit is contained in:
Родитель
d53819824f
Коммит
7683859651
|
@ -0,0 +1,7 @@
|
|||
namespace RadLine
|
||||
{
|
||||
public interface ILineDecorationRenderer
|
||||
{
|
||||
void RenderLineDecoration(LineBuffer buffer);
|
||||
}
|
||||
}
|
|
@ -26,6 +26,8 @@ namespace RadLine
|
|||
public IHighlighter? Highlighter { get; init; }
|
||||
public ILineEditorHistory History => _history;
|
||||
|
||||
public ILineDecorationRenderer? LineDecorationRenderer { get; init; }
|
||||
|
||||
public LineEditor(IAnsiConsole? terminal = null, IInputSource? source = null, IServiceProvider? provider = null)
|
||||
{
|
||||
_console = terminal ?? AnsiConsole.Console;
|
||||
|
@ -185,6 +187,7 @@ namespace RadLine
|
|||
|
||||
// Render the line
|
||||
_renderer.RenderLine(state);
|
||||
LineDecorationRenderer?.RenderLineDecoration(state.Buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче